OFFSET
0,1
COMMENTS
1729 is known as the Hardy-Ramanujan number.
This sequence includes all those starting from the odd numbers: 5, 23, 35, 53, 61, 103, 137, 155, 167, 175, 233, 251, 263, 283, 319, 325, 365, 377, 395, 425, 433, 445, 479, 577, 593, 719, 911, 973, 1079, 1297, 1367, 1619.
Reaches a power of 2 at a(100) = 16. - Alonso del Arte, May 30 2015
LINKS
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
MATHEMATICA
NestList[If[EvenQ[#], #/2, 3# + 1] &, 1729, 100]
PROG
(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]];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Jul 29 2014
STATUS
approved