[go: up one dir, main page]

login
A039502
Iterations of "n->n/2 if n even, n->3n-1 if n odd" (A001281) starting at these numbers reach 17.
4
17, 21, 23, 25, 31, 33, 34, 37, 41, 42, 45, 46, 49, 50, 55, 61, 62, 66, 67, 68, 73, 74, 82, 83, 84, 90, 91, 92, 98, 99, 100, 109, 110, 111, 117, 122, 123, 124, 131, 132, 134, 136, 146, 147, 148, 153, 163, 164, 165, 166, 168, 175, 179, 180, 182, 184, 185, 195, 196
OFFSET
1,1
MATHEMATICA
colln[n_]:= NestWhile[If[EvenQ[#], #/2, 3#-1] &, n, FreeQ[{1, 5, 17}, #] &]; Select[Range[196], colln[#] == 17 &] (* Jayanta Basu, Jun 06 2013 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Christian G. Bower, Feb 15 1999
STATUS
approved