login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Period 6: repeat [1,1,2,0,0,2]. - G. C. Greubel, Feb 06 2023
LINKS
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)
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
Sequence in context: A030202 A159818 A081827 * A280912 A332662 A364036
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Nov 11 2004
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 11:34 EDT 2024. Contains 371967 sequences. (Running on oeis4.)