login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A057534
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), a(n)/13 if 13|a(n), otherwise 17*a(n)+1.
15
61, 1038, 519, 173, 2942, 1471, 25008, 12504, 6252, 3126, 1563, 521, 8858, 4429, 75294, 37647, 12549, 4183, 71112, 35556, 17778, 8889, 2963, 50372, 25186, 12593, 1799, 257, 4370, 2185, 437, 7430, 3715, 743, 12632, 6316, 3158, 1579, 26844, 13422
OFFSET
0,1
COMMENTS
This is the '17x+1' map. The 'Px+1 map': if x is divisible by any prime < P then divide out these primes one at a time starting with the smallest; otherwise multiply x by P and add 1.
Sequence has period 84. - Alois P. Heinz, Jan 19 2021
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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1).
MAPLE
with(numtheory): a := proc(n) option remember: local k; if n=0 then RETURN(61); fi: for k from 1 to 6 do if a(n-1) mod ithprime(k) = 0 then RETURN(a(n-1)/ithprime(k)); fi: od: RETURN(17*a(n-1)+1) end:
MATHEMATICA
a[n_] := a[n] = Which[n == 0, 61, n <= 84, Module[{k}, For[k = 1, k < PrimePi[17], k++, If[Mod[a[n - 1], Prime[k]] == 0, Return[a[n - 1]/Prime[k]]]]; Return[17*a[n - 1] + 1]], True, a[n - 84]];
Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Aug 22 2023, after Maple code *)
PROG
(PARI) a(n)=if(n, n=a(n-1); if(n%2, if(n%3, if(n%5, if(n%7, if(n%11, if(n%13, 17*n+1, n/13), n/11), n/7), n/5), n/3), n/2), 61) \\ Charles R Greathouse IV, Oct 13 2022
CROSSREFS
Cf. A057446, A057216 (short version), A057522, A057614.
Sequence in context: A317283 A264306 A138790 * A152868 A218112 A154428
KEYWORD
nonn,easy
AUTHOR
Murad A. AlDamen (Divisibility(AT)yahoo.com), Oct 17 2000
EXTENSIONS
More terms from James A. Sellers and Larry Reeves (larryr(AT)acm.org), Oct 18 2000
STATUS
approved