cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Murad A. AlDamen (Divisibility(AT)yahoo.com), Oct 17 2000

Keywords

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

Crossrefs

Cf. A057446, A057216 (short version), A057522, A057614.

Programs

  • 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 *)
  • 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

Extensions

More terms from James Sellers and Larry Reeves (larryr(AT)acm.org), Oct 18 2000