The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A070165 Irregular triangle read by rows giving trajectory of n in Collatz problem. 102
 1, 2, 1, 3, 10, 5, 16, 8, 4, 2, 1, 4, 2, 1, 5, 16, 8, 4, 2, 1, 6, 3, 10, 5, 16, 8, 4, 2, 1, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1, 8, 4, 2, 1, 9, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1, 10, 5, 16, 8, 4, 2, 1, 11, 34, 17, 52, 26, 13 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS n-th row has A008908(n) entries (unless some n never reaches 1, in which case the triangle ends with an infinite row). [Escape clause added by N. J. A. Sloane, Jun 06 2017] A216059(n) is the smallest number not occurring in n-th row; see also A216022. Comment on the mp3 file from Gordon Charlton (the recording artist Beat Frequency). The piece uses the first 3242 terms (i.e. the first 100 hailstone sequences), with pitch modulus 36, duration modulus 2. Its musicality stems from the many repetitions and symmetries within the sequence, and in particular the infrequency of multiples of 3. This means that when the pitch modulus is a multiple of 12 the notes are predominantly in the symmetric octatonic scale, known to modern classical composers as the second of Messiaen's modes of limited transposition, and to jazz musicians as half-whole diminished. - N. J. A. Sloane, Jan 30 2019 LINKS T. D. Noe, Rows n = 1..100 of triangle, flattened Gordon Charlton ("Beat Frequency"), Hailstone Trajectory (mp3 file) David Eisenbud and Brady Haran, UNCRACKABLE? The Collatz Conjecture, Numberphile Video, 2016. David Rabahy, Hailstone Sequence presented as a spreadsheet Anatoly E. Voevudko, File of first 10K Collatz sequences Eric Weisstein's World of Mathematics, Collatz Problem Wikipedia, Collatz conjecture FORMULA T(n,k) = T^{(k)}(n) with the k-th iterate of the Collatz map T with T(n) = 3*n+1 if n is odd and T(n) = n/2 if n is even, n >= 1. T^{(0)}(n) = n. k = 0, 1, ..., A008908(n) - 1. - Wolfdieter Lang, Mar 20 2014 EXAMPLE The irregular array a(n,k) starts: n\k   0  1  2  3  4   5  6   7  8  9 10 11 12 13 14 15 16 17 18 19 1:    1 2:    2  1 3:    3 10  5 16  8   4  2   1 4:    4  2  1 5:    5 16  8  4  2   1 6:    6  3 10  5 16   8  4   2  1 7:    7 22 11 34 17  52 26  13 40 20 10  5 16  8  4  2  1 8:    8  4  2  1 9:    9 28 14  7 22  11 34  17 52 26 13 40 20 10  5 16  8  4  2  1 10:  10  5 16  8  4   2  1 11:  11 34 17 52 26  13 40  20 10  5 16  8  4  2  1 12:  12  6  3 10  5  16  8   4  2  1 13:  13 40 20 10  5  16  8   4  2  1 14:  14  7 22 11 34  17 52  26 13 40 20 10  5 16  8  4  2  1 15:  15 46 23 70 35 106 53 160 80 40 20 10  5 16  8  4  2  1 ... Reformatted and extended by Wolfdieter Lang, Mar 20 2014 MAPLE T:= proc(n) option remember; `if`(n=1, 1,       [n, T(`if`(n::even, n/2, 3*n+1))][])     end: seq(T(n), n=1..15);  # Alois P. Heinz, Jan 29 2021 MATHEMATICA Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Flatten[Table[Collatz[n], {n, 10}]] (* T. D. Noe, Dec 03 2012 *) PROG (Haskell) a070165 n k = a070165_tabf !! (n-1) !! (k-1) a070165_tabf = map a070165_row [1..] a070165_row n = (takeWhile (/= 1) \$ iterate a006370 n) ++ [1] a070165_list = concat a070165_tabf -- Reinhard Zumkeller, Oct 07 2011 (PARI) Collatz(n, lim=0)={ my(c=n, e=0, L=List(n)); if(lim==0, e=1; lim=n*10^6); for(i=1, lim, if(c%2==0, c=c/2, c=3*c+1); listput(L, c); if(e&&c==1, break)); return(Vec(L)); } \\Anatoly E. Voevudko, Mar 26 2016 (PARI) Collatzaf(ns, nf, fn="")={ my(V, vn, fng="aCollatz.txt"); if(fn=="", fn=fng); for(i=ns, nf, V=Collatz(i); vn=#V; write(fn, Str(i, "/", vn, ": ", V)); kill(V)); } Collatzaf(1, 10000, "a070165.txt"); \\ a070165.txt file with 10000 rows \\ Anatoly E. Voevudko, Mar 30 2016 (Python) def a(n):     if n==1: return [1]     l=[n, ]     while True:         if n%2==0: n/=2         else: n = 3*n + 1         if n not in l:             l+=[n, ]             if n<2: break         else: break     return l for n in range(1, 101): print(a(n)) # Indranil Ghosh, Apr 14 2017 CROSSREFS Cf. A006667. Cf. A006370, A033493 (row sums). Cf. A220237 (sorted rows), A192719. Cf. A070168 (Terras modified Collatz map). Cf. A254312, A257480 (and crossrefs therein). Cf. A280408 (primes), added by Matthew Campbell, Jan 02 2017 Sequence in context: A332058 A260758 A091858 * A192719 A270996 A203709 Adjacent sequences:  A070162 A070163 A070164 * A070166 A070167 A070168 KEYWORD nonn,easy,tabf AUTHOR Eric W. Weisstein, Apr 23 2002 EXTENSIONS Name specified and row length A-number corrected by Wolfdieter Lang, Mar 20 2014 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 3 08:21 EDT 2021. Contains 346435 sequences. (Running on oeis4.)