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.

Showing 1-8 of 8 results.

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)

A328010 The 5x + 1 sequence beginning at 17.

Original entry on oeis.org

17, 86, 43, 216, 108, 54, 27, 136, 68, 34, 17, 86, 43, 216, 108, 54, 27, 136, 68, 34, 17, 86, 43, 216, 108, 54, 27, 136, 68, 34, 17, 86, 43, 216, 108, 54, 27, 136, 68, 34, 17, 86, 43, 216, 108, 54, 27, 136, 68, 34, 17, 86, 43, 216, 108, 54, 27, 136, 68, 34, 17
Offset: 0

Views

Author

Antoine Beaulieu, Oct 01 2019

Keywords

Comments

The 5x+1 problem is similar to the 3x+1 or Collatz problem. For some starting values it is known that the 5x+1 trajectory will tend to infinity or enter a periodic orbit.
Alex V. Kontorovich & Jeffrey C. Lagarias conjectured that there are very few periodic orbits. One of them is shown here.
The two other known periodic orbits are given in the crossrefs.

Crossrefs

Programs

  • PARI
    Vec((17 + 86*x + 43*x^2 + 216*x^3 + 108*x^4 + 54*x^5 + 27*x^6 + 136*x^7 + 68*x^8 + 34*x^9) / ((1 - x)*(1 + x)*(1 - x + x^2 - x^3 + x^4)*(1 + x + x^2 + x^3 + x^4)) + O(x^60)) \\ Colin Barker, Oct 05 2019

Formula

a(n+1) = 5*a(n) + 1 if a(n) is odd, a(n+1) = a(n)/2 otherwise.
From Colin Barker, Oct 04 2019: (Start)
G.f.: (17 + 86*x + 43*x^2 + 216*x^3 + 108*x^4 + 54*x^5 + 27*x^6 + 136*x^7 + 68*x^8 + 34*x^9) / ((1 - x)*(1 + x)*(1 - x + x^2 - x^3 + x^4)*(1 + x + x^2 + x^3 + x^4)).
a(n) = a(n-10) for n>9.
(End)

A328011 The 5x + 1 sequence beginning at 1.

Original entry on oeis.org

1, 6, 3, 16, 8, 4, 2, 1, 6, 3, 16, 8, 4, 2, 1, 6, 3, 16, 8, 4, 2, 1, 6, 3, 16, 8, 4, 2, 1, 6, 3, 16, 8, 4, 2, 1, 6, 3, 16, 8, 4, 2, 1, 6, 3, 16, 8, 4, 2, 1, 6, 3, 16, 8, 4, 2, 1, 6, 3, 16, 8, 4, 2, 1, 6, 3, 16, 8, 4, 2, 1, 6, 3, 16, 8, 4, 2, 1, 6, 3, 16, 8, 4, 2, 1
Offset: 0

Views

Author

Antoine Beaulieu, Oct 01 2019

Keywords

Comments

See A328010 for further information.

Crossrefs

Programs

  • PARI
    Vec((1 + 6*x + 3*x^2 + 16*x^3 + 8*x^4 + 4*x^5 + 2*x^6) / ((1 - x)*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)) + O(x^80)) \\ Colin Barker, Oct 08 2019

Formula

a(n+1) = 5*a(n) + 1 if a(n) is odd, a(n+1) = a(n)/2 otherwise.
From Colin Barker, Oct 08 2019: (Start)
G.f.: (1 + 6*x + 3*x^2 + 16*x^3 + 8*x^4 + 4*x^5 + 2*x^6) / ((1 - x)*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)).
a(n) = a(n-7) for n>6.
(End)

A028389 The 5x + 1 sequence beginning at 7.

Original entry on oeis.org

7, 36, 18, 9, 46, 23, 116, 58, 29, 146, 73, 366, 183, 916, 458, 229, 1146, 573, 2866, 1433, 7166, 3583, 17916, 8958, 4479, 22396, 11198, 5599, 27996, 13998, 6999, 34996, 17498, 8749, 43746, 21873, 109366, 54683, 273416, 136708, 68354, 34177, 170886, 85443, 427216
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    f := proc(n) option remember; if n = 0 then 7 elif f(n-1) mod 2 = 0 then f(n-1)/2 else 5*f(n-1)+1; fi; end; seq(f(n), n=0..50);
  • Mathematica
    a[0] = 7; a[n_] := a[n] = If[OddQ[a[n-1]], 5 a[n-1] + 1, a[n-1]/2];
    a /@ Range[0, 50] (* Jean-François Alcover, Nov 03 2020 *)
    NestList[If[OddQ[#],5#+1,#/2]&,7,50] (* Harvey P. Dale, Nov 03 2022 *)

Formula

a(0) = 7; a(n) = 5*a(n-1) + 1 if a(n-1) is odd, a(n) = a(n-1)/2 otherwise.

Extensions

Named edited by Andrew Howroyd, Aug 21 2020

A259193 5x + 1 sequence beginning at 11.

Original entry on oeis.org

11, 56, 28, 14, 7, 36, 18, 9, 46, 23, 116, 58, 29, 146, 73, 366, 183, 916, 458, 229, 1146, 573, 2866, 1433, 7166, 3583, 17916, 8958, 4479, 22396, 11198, 5599, 27996, 13998, 6999, 34996, 17498, 8749, 43746, 21873, 109366, 54683, 273416, 136708, 68354, 34177, 170886, 85443
Offset: 0

Views

Author

Alonso del Arte, Jun 21 2015

Keywords

Examples

			11 is odd, so it's followed by 5 * 11 + 1 = 56.
56 is even, so it's followed by 56/2 = 28.
		

Crossrefs

Programs

  • Magma
    [n eq 1 select 11 else IsOdd(Self(n-1)) select 5*Self(n-1)+1 else Self(n-1) div 2: n in [1..80]]; // Vincenzo Librandi, Jul 04 2015
  • Mathematica
    NestList[If[EvenQ[#], #/2, 5# + 1] &, 5, 100]

Formula

a(0) = 11; a(n) = 5a(n - 1) + 1 if a(n - 1) is odd, a(n) = a(n - 1)/2 otherwise.

A270968 Reduced 5x+1 function R applied to the odd integers: a(n) = R(2n-1), where R(k) = (5k+1)/2^r, with r as large as possible.

Original entry on oeis.org

3, 1, 13, 9, 23, 7, 33, 19, 43, 3, 53, 29, 63, 17, 73, 39, 83, 11, 93, 49, 103, 27, 113, 59, 123, 1, 133, 69, 143, 37, 153, 79, 163, 21, 173, 89, 183, 47, 193, 99, 203, 13, 213, 109, 223, 57, 233, 119, 243, 31, 253, 129, 263, 67, 273, 139, 283, 9, 293, 149, 303
Offset: 1

Views

Author

Michel Lagneau, Mar 27 2016

Keywords

Comments

The odd-indexed terms a(2i+1) = 10i+3 = A017305(i), i>=0;
a(4i+4) = 10i+9 = A017377(i), i>=0;
a(8i+6) = 10i+7 = A017353(i), i>=0;
a(16i+2) = 10i+1 = A017281(i), i>=0.
Note that a(n) = a(16n-6) = a(6n-2)/3. No multiple of 5 is in this sequence.
a(n) = R(2n-1) < 2n-1 for n = 2, 6, 10, ..., 2+4i,...

Examples

			a(4)=9 because (2*4-1) = 7  -> (5*7+1)/2^2 = 9.
		

Crossrefs

Programs

  • Mathematica
    nextOddK[n_] := Module[{m=5n+1}, While[EvenQ[m], m=m/2]; m]; (* assumes odd n *) Table[nextOddK[n], {n, 1, 200, 2}]
  • PARI
    a(n) = my(m = 2*n-1, c = 5*m+1); c/2^valuation(c, 2); \\ Michel Marcus, Mar 27 2016

Formula

a(n) = A000265(A017341(n-1)). - Michel Marcus, Mar 27 2016

A271623 a(0)=7; a(n) = 7*a(n-1) + 1 if a(n-1) is odd, a(n) = a(n-1)/2 otherwise.

Original entry on oeis.org

7, 50, 25, 176, 88, 44, 22, 11, 78, 39, 274, 137, 960, 480, 240, 120, 60, 30, 15, 106, 53, 372, 186, 93, 652, 326, 163, 1142, 571, 3998, 1999, 13994, 6997, 48980, 24490, 12245, 85716, 42858, 21429, 150004, 75002, 37501, 262508, 131254, 65627, 459390, 229695
Offset: 0

Views

Author

Vincenzo Librandi, Apr 11 2016

Keywords

Comments

Conjectured: No term of the sequence is equal to a previous term.

Examples

			7 is odd, so it is followed by 7*7 + 1 = 50.
50 is even, so it is followed by 50/2 = 25.
		

Crossrefs

Programs

  • Magma
    [n eq 1 select 7 else IsOdd(Self(n-1)) select 7*Self(n-1)+1 else Self(n-1) div 2: n in [1..60]];
    
  • Mathematica
    NestList[If[EvenQ[#], #/2, 7 # + 1]&, 7, 60]
  • PARI
    Collatz(n, lim=0) = {my(c=n, e=0, L=List(n)); if(lim==0, e=1; lim=n*10^2);
    for(i=1, lim, if(c%2==0, c=c/2, c=7*c+1); listput(L, c); if(e&&c==1, break)); return(Vec(L));}
    print(Collatz(7)) \\ Adapted from A008884 \\ Altug Alkan, Apr 11 2016

A305057 -5x + 1 sequence starting at 5.

Original entry on oeis.org

5, -24, -12, -6, -3, 16, 8, 4, 2, 1, -4, -2, -1, 6, 3, -14, -7, 36, 18, 9, -44, -22, -11, 56, 28, 14, 7, -34, -17, 86, 43, -214, -107, 536, 268, 134, 67, -334, -167, 836, 418, 209, -1044, -522, -261, 1306, 653, -3264, -1632, -816, -408, -204, -102, -51, 256, 128, 64, 32, 16, 8, 4, 2, 1, -4
Offset: 0

Views

Author

Alonso del Arte, May 26 2018

Keywords

Examples

			5 is odd, so it's followed by (-5) * 5 + 1 = -25 + 1 = -24.
-14 is even, so it's followed by -14/2 = -7.
		

Crossrefs

Cf. A259207.

Programs

  • Magma
    [n eq 1 select 5 else IsOdd(Self(n-1)) select -5*Self(n-1)+1 else Self(n-1) div 2: n in [1..80]]; // Vincenzo Librandi, Jun 11 2018
  • Mathematica
    NestList[If[EvenQ[#], #/2, -5# + 1] &, 5, 100]

Formula

a(0) = 5, a(n) = (-5)*a(n - 1) + 1 if a(n - 1) is odd, a(n) = a(n - 1)/2 otherwise.
Showing 1-8 of 8 results.