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.

A006999 Partitioning integers to avoid arithmetic progressions of length 3.

Original entry on oeis.org

0, 1, 2, 4, 7, 11, 17, 26, 40, 61, 92, 139, 209, 314, 472, 709, 1064, 1597, 2396, 3595, 5393, 8090, 12136, 18205, 27308, 40963, 61445, 92168, 138253, 207380, 311071, 466607, 699911, 1049867, 1574801, 2362202, 3543304, 5314957, 7972436
Offset: 0

Views

Author

N. J. A. Sloane, D. R. Hofstadter, and James Propp, Jul 15 1977

Keywords

Comments

a(n) = A006997(3^n-1).
It appears that, aside from the first term, this is the (L)-sieve transform of A016789 ={2,5,8,11,...,3n+2....}. This has been verified up to a(30)=311071. See A152009 for the definition of the (L)-sieve transform. - John W. Layman, Nov 20 2008
a(n) is also the largest-index square reachable in n jumps if we start at square 0 of the Infinite Sidewalk. - Jose Villegas, Mar 27 2023

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A061419, A061418, A005428 (first differences), A083286.
Cf. A003312.

Programs

  • Haskell
    a006999 n = a006999_list !! n
    a006999_list = 0 : map ((`div` 2) . (+ 2) . (* 3)) a006999_list
    -- Reinhard Zumkeller, Oct 26 2011
  • Mathematica
    a[0] = 0; a[n_] := a[n] = Floor[(3 a[n-1] + 2)/2];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Aug 01 2018 *)
  • PARI
    a(n)=if(n<1,0,floor((3*a(n-1)+2)/2))
    

Formula

a(n) = A061419(n) - 1.
a(n) = A061418(n) - 2.
a(n) = floor((3a(n-1)+2)/2).
a(n) = -1 + floor(c*(3/2)^n) where c=1.0815136... - Benoit Cloitre, Jan 10 2002; this constant c is 2/3*K(3) (see A083286). - Ralf Stephan, May 29 2003
a(n+1) = (3*a(n))/2+1 if a(n) is even. a(n+1) = (3*a(n)+1)/2 if a(n) is odd. - Miquel Cerda, Jun 15 2019

Extensions

More terms from James Sellers, Feb 06 2000