A245671 3*x + 1 sequence starting at 1729.
1729, 5188, 2594, 1297, 3892, 1946, 973, 2920, 1460, 730, 365, 1096, 548, 274, 137, 412, 206, 103, 310, 155, 466, 233, 700, 350, 175, 526, 263, 790, 395, 1186, 593, 1780, 890, 445, 1336, 668, 334, 167, 502, 251, 754, 377, 1132, 566, 283, 850, 425, 1276, 638
Offset: 0
Links
Crossrefs
Programs
-
Magma
[n eq 1 select 1729 else IsOdd(Self(n-1)) select 3*Self(n-1)+1 else Self(n-1) div 2: n in [1..100]];
-
Mathematica
NestList[If[EvenQ[#], #/2, 3# + 1] &, 1729, 100]
Formula
a(0) = 1729, a(n) = 3*a(n-1) + 1 if a(n-1) is odd, a(n) = a(n-1)/2 otherwise. - Alois P. Heinz, Jul 29 2014
Comments