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.

A057688 Trajectory of 5 under the '5x+1' map.

Original entry on oeis.org

5, 26, 13, 66, 33, 11, 56, 28, 14, 7, 36, 18, 9, 3, 1, 6, 3, 1, 6, 3, 1, 6, 3, 1, 6, 3, 1, 6, 3, 1, 6, 3, 1, 6, 3, 1, 6, 3, 1, 6, 3, 1, 6, 3, 1, 6, 3, 1, 6, 3, 1, 6, 3, 1, 6, 3, 1, 6, 3, 1, 6, 3, 1, 6, 3, 1, 6, 3, 1, 6, 3, 1, 6, 3, 1, 6, 3, 1, 6, 3, 1, 6, 3, 1, 6, 3, 1, 6
Offset: 0

Views

Author

N. J. A. Sloane, Oct 20 2000

Keywords

Comments

The 'Px + 1 map': if x is divisible by any prime less than P then divide out these primes one at a time starting with the smallest; otherwise multiply x by P and add 1. This is similar to A057684, but with P = 5 instead of P = 13. - Alonso del Arte, Jul 04 2015

Examples

			7 is odd and not divisible by 3, so it's followed by 5 * 7 + 1 = 36.
36 is even, so it's followed by 36/2 = 18.
18 is even, so it's followed by 18/2 = 9.
9 is odd and divisible by 3, so it's followed by 9/3 = 3.
		

Crossrefs

Programs

  • Mathematica
    NestList[If[EvenQ[#], #/2, If[Mod[#, 3] == 0, #/3, 5# + 1]] &, 5, 100] (* Alonso del Arte, Jul 04 2015 *)
  • PARI
    Vec((5 + 26*x + 13*x^2 + 61*x^3 + 7*x^4 - 2*x^5 - 10*x^6 - 5*x^7 + 3*x^8 - 49*x^9 + 8*x^10 + 4*x^11 + 2*x^12 - 33*x^13 - 17*x^14 - 3*x^15) / ((1 - x)*(1 + x + x^2)) + O(x^100)) \\ Colin Barker, Oct 10 2019

Formula

a(0) = 5, a(n) = a(n - 1)/2 if a(n - 1) is even, a(n) = a(n - 1)/3 if a(n - 1) is odd and divisible by 3, a(n) = 5a(n - 1) otherwise.
From Colin Barker, Oct 10 2019: (Start)
G.f.: (5 + 26*x + 13*x^2 + 61*x^3 + 7*x^4 - 2*x^5 - 10*x^6 - 5*x^7 + 3*x^8 - 49*x^9 + 8*x^10 + 4*x^11 + 2*x^12 - 33*x^13 - 17*x^14 - 3*x^15) / ((1 - x)*(1 + x + x^2)).
a(n) = a(n-3) for n>15.
(End)