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.

A088911 Period 6: repeat [1, 1, 1, 0, 0, 0].

Original entry on oeis.org

1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Oct 22 2003

Keywords

Comments

For periodic sequences having a period of 2*k and composed of k ones followed by k zeros we have a(n) = floor(((n+k) mod 2*k)/k). Sequences of this form are A000035(n+1) (k=1), A133872(n) (k=2), this sequence (k=3), A131078(n) (k=4), and A112713(n-1) (k=5). - Gary Detlefs, May 17 2011

Crossrefs

Programs

  • Magma
    &cat [[1, 1, 1, 0, 0, 0]^^30]; // Wesley Ivan Hurt, Jul 05 2016
    
  • Maple
    seq(op([1, 1, 1, 0, 0, 0]), n=0..40); # Wesley Ivan Hurt, Jul 05 2016
  • Mathematica
    CoefficientList[Series[(1 + x + x^2)/(1 - x^6), {x, 0, 50}], x]
    Flatten[Table[{1,1,1,0,0,0},{20}]] (* Harvey P. Dale, Jul 17 2011 *)
  • PARI
    a(n)=n%6<3 \\ Jaume Oliver Lafont, Mar 17 2009
    
  • Python
    def A088911(n): return int(n % 6 < 3) # Chai Wah Wu, May 25 2022

Formula

G.f.: (1+x+x^2)/(1-x^6) = 1/((1-x)*(1+x)*(1-x+x^2)).
a(n) = a(n-6) for n>=6, a(0)=a(1)=a(2)=1, a(3)=a(4)=a(5)=0.
a(n) = ((-1)^floor((5*n + 2)/3) + 1)/2 = ( (-1)^floor(n/3) + 1 )/2. [Simplified by Bruno Berselli, Jul 09 2013]
a(n) = Sum_{k=0..floor(n/2)} U(n-2k, 1/2). - Paul Barry, Nov 15 2003
From Paul Barry, Mar 14 2004: (Start)
Partial sums of expansion of 1/(1+x^3), see A131531.
a(n) = 2*sin(Pi*n/3 + Pi/6)/3 + cos(Pi*n)/6 + 1/2. (End)
a(n) = floor(((n+3) mod 6)/3).
a(n) = floor((5*n-1)/3) mod 2. - Gary Detlefs, May 17 2011
a(n) = 1/2 + cos(Pi*n/3)/3 + sin(Pi*n/3)/sqrt(3) + (-1)^n/6. - R. J. Mathar, Oct 08 2011
a(n) = floor(((n+2)^2)/3) mod 2. - Wesley Ivan Hurt, Jun 29 2013
a(n) = A079979(n) + A079979(n-1) + A079979(n-2). - R. J. Mathar, Jul 10 2015
a(n) = a(n-1) - a(n-3) + a(n-4) for n > 3. - Wesley Ivan Hurt, Jul 05 2016
a(n) = 2*floor(n/6) - floor(n/3) + 1. - Ridouane Oudra, Dec 14 2021
E.g.f.: (2*cosh(x) + exp(x/2)*(cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2)) + sinh(x))/3. - Stefano Spezia, Aug 04 2025