login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A100286
Expansion of (1+2*x^2-2*x^3+2*x^4)/(1-x+x^2-x^3+x^4-x^5).
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, 1, 1, 2, 0, 0, 2
OFFSET
0,3
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
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
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 *)
PROG
(Magma) [2 +(n mod 2)*(1-((n+2) mod 3)) -((n+1) mod 3): n in [0..100]]; // 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
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Nov 11 2004
STATUS
approved