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!)
A117907 Expansion of x + (1-x)^2/(1-x^6). 2
1, -1, 1, 0, 0, 0, 1, -2, 1, 0, 0, 0, 1, -2, 1, 0, 0, 0, 1, -2, 1, 0, 0, 0, 1, -2, 1, 0, 0, 0, 1, -2, 1, 0, 0, 0, 1, -2, 1, 0, 0, 0, 1, -2, 1, 0, 0, 0, 1, -2, 1, 0, 0, 0, 1, -2, 1, 0, 0, 0, 1, -2, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,8
COMMENTS
Diagonal sums of A117906.
LINKS
FORMULA
G.f.: (1 +x^2 +x^3 +x^4 +x^5 +x^6)/(1 +x +x^2 +x^3 +x^4 +x^5).
a(n) = floor((5*n-1)/3) mod 2 - 3*[(n mod 6) = 1], n >= 2, with a(0) = 1, a(1) = -1. - G. C. Greubel, Oct 20 2021
MATHEMATICA
(* From Harvey P. Dale, Nov 29 2013 *)
CoefficientList[Series[x+(1-x)^2/(1-x^6), {x, 0, 90}], x]
Join[{1, -1}, LinearRecurrence[{-1, -1, -1, -1, -1}, {1, 0, 0, 0, 1}, 90]]
PadRight[{1, -1}, 90, {1, -2, 1, 0, 0, 0}] (* End *)
PROG
(Magma) R<x>:=PowerSeriesRing(Integers(), 90); Coefficients(R!( x + (1-x)^2/(1-x^6) )); // G. C. Greubel, Oct 20 2021
(Sage)
def A117907(n): return (-1)^n if (n<2) else (((5*n-1)//3)%2) - 3*bool(n%6==1)
[A117907(n) for n in (0..90)] # G. C. Greubel, Oct 20 2021
CROSSREFS
Sequence in context: A024944 A304871 A362370 * A300069 A284586 A281244
KEYWORD
easy,sign
AUTHOR
Paul Barry, Apr 01 2006
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 23 23:26 EDT 2024. Contains 371917 sequences. (Running on oeis4.)