login
A100285
Expansion of (1+5*x^2)/(1-x+x^2-x^3).
3
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,3
COMMENTS
This sequence is periodic. - T. D. Noe, Nov 09 2006
Decimal expansion of 35/303. - Elmo R. Oliveira, May 11 2024
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)
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 *)
PROG
(Magma) [(((n+2) mod 4) + 5*(n mod 4) - 6*(n mod 2))/2: n in [0..100]]; // G. C. Greubel, Feb 06 2023
(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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Barry, Nov 11 2004
EXTENSIONS
Corrected by T. D. Noe, Nov 09 2006
STATUS
approved