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

A076052 Sum(k=1, n, A006460(k)).

Original entry on oeis.org

1, 3, 5, 9, 13, 17, 19, 20, 22, 23, 27, 28, 29, 33, 37, 39, 40, 44, 48, 50, 52, 53, 54, 56, 60, 62, 63, 64, 65, 66, 68, 72, 76, 78, 80, 81, 82, 83, 85, 89, 91, 95, 99, 101, 103, 105, 109, 113, 114, 115, 116, 120, 124, 126, 128, 130, 134, 136, 140, 142, 144, 148, 152
Offset: 1

Views

Author

Benoit Cloitre, Oct 30 2002

Keywords

Programs

  • Haskell
    a076052 n = a076052_list !! (n-1)
    a076052_list = scanl1 (+) $ map a006460 [1..]
    -- Reinhard Zumkeller, Nov 16 2013

Formula

a(n) seems to be asymptotic to 7/3*n

A076087 a(n) = 7*n - 3 * Sum_{i=1..n} A006460(i).

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Oct 30 2002

Keywords

Comments

Recalling the Collatz map (cf. A006370 ): x->x/2 if x is even; x->3x+1 if x is odd, let C_m(n) denotes the image of n after m iterations. Then b(n) = A006460(n) = lim_{k -> infinity} C_3k(n) (from the Collatz conjecture C_3k(n) is constant = 1, 2 or 4 for k large enough). Curiously the graph for a(n) presents "regularities" around zero and a pattern coming bigger and bigger. Compared with a random sequence of form : 7*n-3*Sum_{k=1..n} r(k) where r(k) takes random values among (1;2;4).

Examples

			since 3->10->5->16->8->4->2->1 etc. C_6(3)=2 and then for any k>=2 C_3k(3)=2, hence b(3)=2.
		

Crossrefs

Extensions

Revised by Sean A. Irvine, Mar 19 2025

A139399 Number of steps to reach a cycle in Collatz problem.

Original entry on oeis.org

0, 0, 5, 0, 3, 6, 14, 1, 17, 4, 12, 7, 7, 15, 15, 2, 10, 18, 18, 5, 5, 13, 13, 8, 21, 8, 109, 16, 16, 16, 104, 3, 24, 11, 11, 19, 19, 19, 32, 6, 107, 6, 27, 14, 14, 14, 102, 9, 22, 22, 22, 9, 9, 110, 110, 17, 30, 17, 30, 17, 17, 105, 105, 4, 25, 25, 25, 12, 12, 12, 100, 20, 113, 20
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 18 2008

Keywords

Comments

a(1)=a(2)=a(4)=0 as A006370(A006370(A006370(x)))=x for x=1,2,4 [corrected by Rémy Sigrist, Jun 28 2020];
a(n) = A006577(n) - 2 for n > 2 (if the conjecture holds).
For n>2: let L = a(n) mod 3, then A006460(n) = if L=0 then 4 else L. - Reinhard Zumkeller, Nov 17 2013

Crossrefs

Essentially the same sequence as A112695.

Programs

  • Haskell
    a139399 = f 0 where
       f k x = if x `elem` [1,2,4] then k else f (k + 1) (a006370 x)
    -- Reinhard Zumkeller, Nov 17 2013
  • Mathematica
    f[n_] := If[EvenQ[n], n/2, 3 n + 1];
    a[n_] := If[n<3, 0, Length[NestWhileList[f, n, {#1, #2, #3} != {4, 2, 1}&, 3]] - 3];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Aug 08 2022 *)
Showing 1-3 of 3 results.