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.

A300069 Period 6: repeat [0, 0, 0, 1, 2, 1].

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Feb 24 2018

Keywords

Comments

Underlying A174257(n+1), n >= 0.

Crossrefs

Programs

  • Mathematica
    PadRight[{}, 102, {0, 0, 0, 1, 2, 1}] (* or *)
    CoefficientList[Series[x^3*(1 + x)^2/(1 - x^6), {x, 0, 102}], x] (* Michael De Vlieger, Feb 25 2018 *)
  • PARI
    a(n) = my(v=[0, 0, 1, 2, 1]); v[if(n%6==0, 1, n%6)] \\ Felix Fröhlich, Feb 24 2018
    
  • PARI
    concat(vector(3), Vec(x^3*(1 + x)^2/(1 - x^6) + O(x^40))) \\ Felix Fröhlich, Feb 25 2018

Formula

a(n) = floor((n (mod 6))/3) + floor((n + 1 (mod 6))/5), n >= 0.
G.f.: x^3*(1 + x)^2/(1 - x^6) = -x^3*(1+x)/(x-1)/(1+x+x^2)/(1-x+x^2).
a(n) = (4 - 3*cos(n*Pi/3) - cos(2*n*Pi/3) - 3*sqrt(3)*sin(n*Pi/3) + sqrt(3)*sin(2*n*Pi/3))/6. - Wesley Ivan Hurt, Oct 04 2018