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!)
A101676 a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5) with initial terms 1,0,-2,-1,0. 3
1, 0, -2, -1, 0, 0, 1, 0, -2, -1, 0, 0, 1, 0, -2, -1, 0, 0, 1, 0, -2, -1, 0, 0, 1, 0, -2, -1, 0, 0, 1, 0, -2, -1, 0, 0, 1, 0, -2, -1, 0, 0, 1, 0, -2, -1, 0, 0, 1, 0, -2, -1, 0, 0, 1, 0, -2, -1, 0, 0, 1, 0, -2, -1, 0, 0, 1, 0, -2, -1, 0, 0, 1, 0, -2, -1, 0, 0, 1, 0, -2, -1, 0, 0, 1, 0, -2, -1, 0, 0, 1, 0, -2, -1, 0, 0, 1, 0, -2, -1, 0, 0, 1, 0, -2 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Partial sums of A101675. Partial sums are A101677.
Sequence has period 6. - Ralf Stephan, May 16 2007
LINKS
FORMULA
G.f.: (1 - x - x^2)/((1 - x)*(1 + x^2 + x^4)).
a(n) = -cos(2*Pi*n/3+Pi/3)/3 + sin(2*Pi*n/3+Pi/3)/sqrt(3) + 2*cos(Pi*n/3+Pi/6)/sqrt(3) - 1/3.
MATHEMATICA
LinearRecurrence[{1, -1, 1, -1, 1}, {1, 0, -2, -1, 0}, 105] (* Ray Chandler, Sep 03 2015 *)
PROG
(PARI) x='x+O('x^100); Vec((1-x-x^2)/((1-x)*(1+x^2+x^4))) \\ G. C. Greubel, Sep 07 2018
(Magma) I:=[1, 0, -2, -1, 0]; [n le 5 select I[n] else Self(n-1) - Self(n-2) +Self(n-3) -Self(n-4) +Self(n-5): n in [1..100]]; // G. C. Greubel, Sep 07 2018
CROSSREFS
Sequence in context: A352512 A364032 A333397 * A056560 A345415 A096608
KEYWORD
sign,easy
AUTHOR
Paul Barry, Dec 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 May 3 09:32 EDT 2024. Contains 372207 sequences. (Running on oeis4.)