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 22. - Alois P. Heinz, Jan 15 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,1).
EXAMPLE
61 -> 17*61+1 = 1038 = 2*3*173 -> 173, so second term is 173.
MATHEMATICA
a[n_] := a[n] = Which[n == 0, 61, n <= 22, Times @@ Power @@@ Select[ FactorInteger[17 a[n - 1] + 1], #[[1]] >= 17&], True, a[n - 22]];
Table[a[n], {n, 0, 43}] (* Jean-François Alcover, Aug 21 2023 *)
PROG
(PARI) lista(nn) = {my(x=61); for (n=1, nn, print1(x, ", "); my(f=factor(17*x+1)); for (k=1, #f~, if (f[k, 1] < 17, f[k, 1] = 1)); x = factorback(f); ); } \\ Michel Marcus, Jan 19 2021
CROSSREFS
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