OEIS/A291939

From tehowiki
Revision as of 16:28, 25 March 2018 by imported>Gfis (Created page with "==First number on layer n of hailstone chain== The sequence had keyword <code>unkn</code> until March 2018, and there were only 5 terms: * 1, 12, 19, 27, 37 The comment read:...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

First number on layer n of hailstone chain

The sequence had keyword unkn until March 2018, and there were only 5 terms:

  • 1, 12, 19, 27, 37

The comment read:

If hailstone chains are strictly drawn in numerical order at right angles with consistent 
direction, overlaps occur. The first set of numbers that do not overlap could be considered the 
'first layer'. Once an overlap is needed, all numbers farther up the chain (inclusive) are on a 
higher layer. This is the sequence of the first numbers to appear on layer n.

Hailstone chain is a synonym for Collatz sequences or the 3n+1 problem - see Index entries for sequences related to 3x+1 (or Collatz) problem.

After some experimenting it became clear that the description is incomplete, and that it is difficult to develop the sequence with 2-dimensional paper and pencil.

Generating Perl Program

The following Perl program has a more detailled description at the beginning. The program generates the 5 terms, and 1769

Take the Collatz sequences (CSs) from A070165, and build a 3-dimensional 
structure representing all CSs up to some starting number (10000).
In that 3D structure, the y direction is downwards, x is to the right, 
and the "layer" z is outside.
Process all CSs with increasing starting number coln = 1, 2, 3 ... 10000.
Begin at the end of any CS (4 2 1), and proceeding up to
the starting number. Name the elements e(1) = 1, e(2) = 2, e(3) = 4 etc.
Position the trailing element e(1) = 1 at coordinates (x,y,z) = (0,0,0). 
Investigate all e[i] (i > 1):
for even e[i] "go right" = store e[i] at (e[i-1)].(x+1), e[i-1].y, e[i-1].z), 
for odd  e[i] "go down"  = store e[i] at (e[i-1)].x, e[i-1].(y+1), e[i-1].z),
whenever that position is not occupied by a different number, 
otherwise "go up", i.e. increase the layer z by one for all new elements
to be stored from now on.
The target sequence A291939 = a(n) consists of the starting 
values of the CSs which reach a z coordinate of n for the first 
time.

The is a table of the Collatz sequences up to starting value 10000 in A070165/a070165.txt.