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.

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

Original entry on oeis.org

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

Views

Author

Paul Barry, Nov 11 2004

Keywords

Comments

This sequence is periodic. - T. D. Noe, Nov 09 2006
Decimal expansion of 35/303. - Elmo R. Oliveira, May 11 2024

Crossrefs

Programs

  • Magma
    [(((n+2) mod 4) + 5*(n mod 4) - 6*(n mod 2))/2: n in [0..100]]; // G. C. Greubel, Feb 06 2023
    
  • Mathematica
    CoefficientList[Series[(1+5x^2)/(1-x+x^2-x^3),{x,0,100}],x] (* or *) PadRight[{},100,{1,1,5,5}] (* Harvey P. Dale, Jun 02 2021 *)
  • SageMath
    def A100285(n): return (((n+2)%4) +5*(n%4) -6*(n%2))/2
    [A100285(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) = 3 - 2*cos(Pi*n/2) - 2*sin(Pi*n/2).
a(n) = mod(A100284(n), 8).
From G. C. Greubel, Feb 06 2023: (Start)
a(n) = A133872(n) + 5*A133872(n+2).
a(n) = ((n+2 mod 4) + 5*(n mod 4) - 6*(n mod 2))/2.
a(n) = 3 -((1+i)*(-1)^n +(1-i)*i^n) = 3 -2*(A056594(n) +A056594(n-1)).
G.f.: (1+5*x^2)/((1-x)*(1+x^2)).
E.g.f.: 3*exp(x) - 2*cos(x) - 2*sin(x). (End)

Extensions

Corrected by T. D. Noe, Nov 09 2006