A057522 a(n+1) = a(n)/2 if 2|a(n), a(n)/3 if 3|a(n), a(n)/5 if 5|a(n), a(n)/7 if 7|a(n), a(n)/11 if 11|a(n), otherwise 13*a(n)+1.
73, 950, 475, 95, 19, 248, 124, 62, 31, 404, 202, 101, 1314, 657, 219, 73, 950, 475, 95, 19, 248, 124, 62, 31, 404, 202, 101, 1314, 657, 219, 73, 950, 475, 95, 19, 248, 124, 62, 31, 404, 202, 101, 1314, 657, 219, 73, 950, 475, 95, 19, 248, 124, 62, 31, 404, 202
Offset: 0
Keywords
Examples
73 -> 19*73+1 = 950, 950 = 2*5^2*19 -> 950/2 = 475, etc.
Links
- Eric Weisstein's World of Mathematics, Collatz problem
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,0,0,0,0,0,1).
Programs
-
Mathematica
nxt[n_]:=Which[Divisible[n,2],n/2,Divisible[n,3],n/3, Divisible[n,5], n/5, Divisible[n,7], n/7,Divisible[n,11],n/11,True,13n+1]; NestList[nxt,73,60] (* Harvey P. Dale, May 02 2011 *)
Formula
For n>15, a(n) = a(n-15). [Harvey P. Dale, May 02 2011]
Comments