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-6 of 6 results.

A074472 Length of iteration sequence of Collatz-function (A006370) when initial value is 3^n (A000244) and final cycle is followed once.

Original entry on oeis.org

1, 8, 20, 112, 23, 97, 34, 77, 76, 44, 136, 135, 134, 133, 145, 206, 130, 191, 141, 96, 95, 262, 429, 92, 259, 395, 332, 256, 255, 391, 390, 389, 463, 462, 461, 460, 459, 458, 457, 456, 455, 454, 502, 501, 451, 499, 498, 753, 496, 495, 494, 749, 492, 747, 490
Offset: 0

Views

Author

Labos Elemer, Sep 19 2002

Keywords

Examples

			n=2: initial value=3^2, list of iterates is {9,28,14,7,22,11,34,17,52,26,13,50,20,10,5,16,8,4,2,1} length=a(2)=20; Observe that consecutive powers of 3 as arguments frequently provide iteration-lengths of consecutive integers, for instance n=10,11,12,13 give L=136,135,134,133 or n=88-96 result in L=1278-1271.
		

Crossrefs

Programs

  • Mathematica
    f[x_] := (1-Mod[x, 2])*(x/2)+(Mod[x, 2])*(3*x+1); f[1]=1; Table[1+Length[FixedPointList[f, 3^w]], {w, 1, 100}]

A075487 Length of iteration list when Collatz-function is iterated with initial value 1+3^n.

Original entry on oeis.org

2, 3, 7, 19, 111, 22, 96, 33, 76, 75, 43, 135, 134, 133, 132, 144, 205, 129, 190, 140, 95, 94, 261, 428, 91, 258, 394, 331, 255, 254, 390, 389, 388, 462, 461, 460, 459, 458, 457, 456, 455, 454, 453, 501, 500, 450, 498, 497, 752, 495, 494, 493, 748, 491, 746, 489
Offset: 0

Views

Author

Labos Elemer, Sep 26 2002

Keywords

Comments

n=2, 1+3^n = 10, list = {10,5,16,8,4,2,1}, so a(2)=7

Crossrefs

Programs

  • Mathematica
    coll[n_]:=Length[NestWhileList[If[EvenQ[#],#/2,3#+1]&,n,#!=1&]]; coll /@ (3^Range[0, 60] + 1) (* Harvey P. Dale, Dec 15 2014 *)

Formula

a(n) = A008908(3^n+1).

A075484 Length of iteration-list when Collatz-function(A006370) is iterated with initial value 5^n.

Original entry on oeis.org

1, 6, 24, 109, 26, 124, 147, 139, 100, 92, 115, 337, 135, 277, 181, 261, 240, 219, 286, 322, 451, 337, 303, 432, 243, 540, 408, 444, 304, 464, 438, 554, 484, 582, 517, 677, 462, 617, 1002, 539, 655, 709, 714, 737, 623, 708, 868, 723, 707, 676, 642, 833, 776
Offset: 0

Views

Author

Labos Elemer, Sep 26 2002

Keywords

Examples

			n=2: 5^n=25, list={25, 76, 38, 19, 58, 29, 88, 44, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10.5, 16, 8, 4, 2, 1}, a(2)=24.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, 5^n, # != 1 &]], {n, 0, 52}] (* Michael De Vlieger, Feb 25 2017 *)

Formula

a(n) = A008908(5^n).

A075486 Length of iteration list when Collatz-function is iterated with initial value 2^n + 1.

Original entry on oeis.org

8, 6, 20, 13, 27, 28, 122, 123, 36, 37, 157, 114, 53, 54, 99, 100, 101, 102, 103, 73, 167, 168, 169, 170, 171, 172, 248, 174, 188, 189, 252, 253, 179, 180, 318, 244, 196, 197, 154, 155, 156, 157, 401, 327, 496, 497, 162, 163, 332, 333, 409, 472, 411, 412, 338
Offset: 1

Views

Author

Labos Elemer, Sep 26 2002

Keywords

Comments

n=4, 1+2^n = 17, list = {17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1}, so a(4) = 13.

Crossrefs

Programs

  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Table[Length[Collatz[2^n + 1]], {n, 100}] (* T. D. Noe, Jan 17 2013 *)

Formula

a(n) = A008908(2^n+1).

A075485 Length of iteration list when Collatz-function is iterated with initial value 2^n - 1.

Original entry on oeis.org

1, 8, 17, 18, 107, 108, 47, 48, 62, 63, 157, 158, 159, 160, 130, 131, 225, 226, 178, 179, 304, 305, 474, 475, 445, 446, 385, 386, 449, 450, 451, 452, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 853, 854
Offset: 1

Views

Author

Labos Elemer, Sep 26 2002

Keywords

Comments

Somewhat surprisingly, these iterations take almost twice as long as the iterations for 2^n + 1. See A075486. - T. D. Noe, Jan 17 2013

Examples

			n=4, 2^n - 1 = 15, list = {15, 46, 23, 70, 35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1}, so a(4) = 18.
		

Crossrefs

Programs

  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Table[Length[Collatz[2^n - 1]], {n, 100}] (* T. D. Noe, Jan 17 2013 *)

Formula

a(n) = A008908(2^n-1).

A081613 Length of iteration list when Collatz-function is iterated with initial value n!=A000142[n].

Original entry on oeis.org

1, 1, 2, 9, 11, 21, 21, 42, 45, 87, 67, 148, 211, 176, 265, 256, 260, 427, 426, 363, 388, 501, 490, 448, 450, 390, 560, 420, 518, 634, 445, 530, 535, 796, 951, 827, 814, 1070, 690, 729, 786, 910, 820, 1014, 1172, 1219, 997, 1328, 1331, 892, 1296
Offset: 0

Views

Author

Labos Elemer, Apr 17 2003

Keywords

Examples

			n = 6: list = {720, 360, 180, 90, 45, 136, 68, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1 }
		

Crossrefs

Programs

  • Mathematica
    f[x_] := (1-Mod[x, 2])*(x/2)+(Mod[x, 2])*(3*x+1) f[1]=1; f0[x_] := FixedPointList[f, x] le[x_] := Length[FixedPointList[f, x]]-1 Table[le[w! ], {w, 1, 50}]
    Table[Length[NestWhileList[If[EvenQ[#],#/2,3#+1]&,n!,#!=1&]],{n,0,50}] (* Harvey P. Dale, Apr 08 2012 *)

Formula

a(n)=A008908(A000142(n))
Showing 1-6 of 6 results.