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.

A100286 Expansion of (1+2*x^2-2*x^3+2*x^4)/(1-x+x^2-x^3+x^4-x^5).

Original entry on oeis.org

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

Views

Author

Paul Barry, Nov 11 2004

Keywords

Comments

Period 6: repeat [1,1,2,0,0,2]. - G. C. Greubel, Feb 06 2023
Decimal expansion of 3394/30303. - Elmo R. Oliveira, May 11 2024

Crossrefs

Programs

  • Magma
    [2 +(n mod 2)*(1-((n+2) mod 3)) -((n+1) mod 3): n in [0..100]]; // G. C. Greubel, Feb 06 2023
    
  • Mathematica
    CoefficientList[Series[(1+2x^2-2x^3+2x^4)/(1-x+x^2-x^3+x^4-x^5),{x,0,100}],x] (* Harvey P. Dale, Mar 03 2019 *)
    PadRight[{}, 120, {1,1,2,0,0,2}] (* G. C. Greubel, Feb 06 2023 *)
  • SageMath
    def A100286(n): return 2 +(n%2)*(1-((n-1)%3)) -((n+1)%3)
    [A100286(n) for n in range(101)] # G. C. Greubel, Feb 06 2023

Formula

a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5).
a(n) = (1/6)*(6 + 3*cos(Pi*n/3) - 3*cos(2*Pi*n/3) + sqrt(3)*sin(Pi*n/3) - 3*sqrt(3)*sin(2*Pi*n/3)).
a(n) = mod(A100284(n), 3).
From G. C. Greubel, Feb 06 2023: (Start)
a(n) = a(n-6).
a(n) = (1/2)*(2 + A010892(n) - A049347(n) - 2*A049347(n-1)).
a(n) = 2 + (n mod 2)*(1 - (n-1 mod 3)) - (n+1 mod 3). (End)
a(n) = 1 + A131736(n). - Elmo R. Oliveira, Jun 20 2024