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

A076229 Smallest number such that A076228(a(n)) = n.

Original entry on oeis.org

2, 3, 5, 7, 6, 9, 20, 12, 14, 19, 22, 41, 18, 55, 28, 33, 37, 58, 36, 50, 59, 65, 57, 66, 78, 110, 118, 109, 114, 108, 199, 129, 146, 145, 188, 164, 278, 246, 265, 171, 195, 250, 193, 194, 216, 313, 430, 380, 429, 291, 257, 293, 290, 258, 639, 391, 411, 415, 572
Offset: 1

Views

Author

Labos Elemer, Oct 01 2002

Keywords

Examples

			For n=6, a(6)=9 because first in iteration list starting with 9, i.e. in {9, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1}, there are 6 terms below 9: {7, 5, 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_] := Delete[FixedPointList[f,x],-1]
    f1[x_] := f0[x]-Part[f0[x],1]
    g[x_] := Count[Sign[f1[x]],-1]
    t=Table[0,{256}]; Do[s=g[n]; If[s<257&&t[[s]]==0,t[[s]]=n],{n,1,1000}]; t

Formula

a(n) = Min{x; A076228(x) = n}.

A159999 Number of numbers not greater than n occurring in Collatz (3x+1) trajectory starting with n.

Original entry on oeis.org

1, 2, 3, 3, 4, 6, 5, 4, 7, 6, 7, 9, 7, 10, 7, 5, 9, 14, 11, 8, 6, 12, 9, 11, 14, 10, 10, 16, 14, 11, 10, 6, 17, 12, 9, 20, 18, 17, 18, 9, 13, 8, 20, 16, 14, 12, 13, 12, 20, 21, 18, 12, 10, 18, 15, 20, 24, 19, 22, 16, 14, 17, 15, 7, 23, 25, 22, 15, 13, 12, 16, 23
Offset: 1

Views

Author

Reinhard Zumkeller, May 04 2009

Keywords

Comments

If the Collatz conjecture is true, there are no cycles in the 3x+1 trajectory and the difference between the counts here and those of A076228 is that the start value is counted here but not there; then a(n) = 1+A076228(n) [discovered by sequencedb.net]. - R. J. Mathar, Jun 24 2021

Examples

			a(9) = #{1,2,4,5,7,8,9} = 7, as
9-28-14-7-22-11-34-17-52-26-13-40-20-10-5-16-8-[4-2-1]*
9-..-..-7-..-..-..-..-..-..-..-..-..-..-5-..-8-[4-2-1]*.
		

Crossrefs

Programs

  • Haskell
    a159999 n = length $ takeWhile (<= n) $ sort $ a070165_row n
    -- Reinhard Zumkeller, Sep 01 2012
  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; f[n_] := Module[{c = Collatz[n]}, Length[Select[c, # <= n &]]]; Table[ f[n], {n, 100}] (* T. D. Noe, Mar 07 2013 *)

Formula

a(n) < n for n>6;
a(A033496(n)) = A008908(A033496(n)).
a(n) = f(n,n,1) with f(n,m,x) = if m=1 then x else f(n, A006370(m), if A006370(m)
a(n) = n - A246436(n); row lengths of triangle A214614. - Reinhard Zumkeller, Sep 01 2014

A213204 Number of terms of the Collatz (3x+1) trajectory of n that are greater than or equal to n.

Original entry on oeis.org

1, 1, 6, 1, 3, 4, 13, 1, 14, 2, 9, 2, 4, 9, 12, 1, 5, 8, 11, 1, 3, 5, 8, 1, 11, 2, 103, 4, 6, 9, 98, 1, 11, 3, 6, 3, 5, 6, 18, 1, 98, 2, 11, 2, 4, 6, 93, 1, 6, 5, 8, 1, 3, 96, 99, 1, 10, 2, 12, 5, 7, 92, 94, 1, 6, 4, 7, 1, 3, 4, 88, 1, 98, 2, 8, 2, 4, 11, 14
Offset: 1

Author

Jayanta Basu, Mar 01 2013

Keywords

Examples

			For n=3, the Collatz trajectory is 3, 10, 5, 16, 8, 4, 2, 1 and hence a(3)=6.
		

Crossrefs

Programs

  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Table[Length[Select[Collatz[n], # >= n &]], {n, 100}]

Formula

a(n) = A222597(n) - 1.

A217731 Numbers n such that in Collatz (3x+1) trajectory of n, the number of terms < n equals number of terms > n.

Original entry on oeis.org

1, 19, 39, 75, 201, 428, 462, 550, 583, 593, 638, 702, 755, 1486, 2395, 3023, 3583, 3867, 5342, 6998, 7419, 8283, 10367, 10447, 10524, 10567, 10879, 11219, 12379, 13647, 13650, 14252, 14561, 14783, 15230, 15871, 16871, 16875, 17121, 17385, 18046, 19279, 19691
Offset: 1

Author

Jayanta Basu, Mar 26 2013

Keywords

Examples

			19 is in the list because Collatz trajectory of 19 is {19, 58, 29, 88, 44, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1} and number of terms < 19 = 10 = number of terms > 19.
		

Crossrefs

Programs

  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3*# + 1] &, n, # > 1 &]; t = {};Do[If[Length[Select[Collatz[n], # < n &]] == Length[Select[Collatz[n], # > n &]], AppendTo[t, n]], {n, 50000}]; t
Showing 1-4 of 4 results.