login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A235795 Triangle read by rows T(n,k) in which row n gives the trajectory of n in Collatz problem including the trajectory [1, 4, 2, 1] for n = 1. 8
1, 4, 2, 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
Also [1, 4, 2] together with A070165.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..11449 (rows 1..250, flattened)
EXAMPLE
The irregular triangle begins:
1,4,2,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,40,20,10,5,16,8,4,2,1;
12,6,3,10,5,16,8,4,2,1;
13,40,20,10,5,16,8,4,2,1;
14,7,22,11,34,17,52,26,13,40,20,10,5,16,8,4,2,1;
...
MATHEMATICA
Prepend[Array[NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, #, # > 1 &] &, 10, 2], NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, 1, # > 1 &, {2, 1}]] // Flatten (* Michael De Vlieger, Oct 27 2021 *)
PROG
(PARI) f(n) = if (n%2, 3*n+1, n/2); \\ A014682
row(n) = {my(list=List()); listput(list, n); until(n==1, n = f(n); listput(list, n)); Vec(list); } \\ Michel Marcus, Sep 10 2021
CROSSREFS
Cf. A000079, A014682, A006370, A070165, A235800, A235801, A347270 (all 3x+1 sequences).
Sequence in context: A085245 A327694 A348136 * A046096 A080816 A016507
KEYWORD
nonn,tabf
AUTHOR
Omar E. Pol, Jan 15 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)