The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A117447 Expansion of (1 + 2*x + 3*x^2 + x^3)/(1 + x - x^3 - x^4). 3
1, 1, 2, 0, 2, 1, 1, 1, 2, 0, 2, 1, 1, 1, 2, 0, 2, 1, 1, 1, 2, 0, 2, 1, 1, 1, 2, 0, 2, 1, 1, 1, 2, 0, 2, 1, 1, 1, 2, 0, 2, 1, 1, 1, 2, 0, 2, 1, 1, 1, 2, 0, 2, 1, 1, 1, 2, 0, 2, 1, 1, 1, 2, 0, 2, 1, 1, 1, 2, 0, 2, 1, 1, 1, 2, 0, 2, 1, 1, 1, 2, 0, 2, 1, 1, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
The sequence a(n+3) is periodic {0,2,1,1,1,2} with g.f. x*(2 + 3*x + 2*x^2)/(1 + x - x^3 - x^4). Row sums of number triangle A117446.
LINKS
FORMULA
G.f.: 1 + x + 2*x^2 + x^4*(2 + 3*x + 2*x^2)/(1 + x - x^3 - x^4).
a(n) = Sum_{k=0..n} binomial(L(k/3), n-k), where L(j/p) is the Legendre symbol of j and p.
a(n) = 7/6 - 1/2*(-1)^n - 2/3*cos(2*Pi*n/3). - Richard Choulet, Dec 12 2008
a(n) = (n+3) mod 2 + (n+3)^2 mod 3. - Gary Detlefs, Apr 21 2012
a(n) = (1/2)*(2 + (-1)^n + (-1)^(2 - (n+1) mod 3))). - Bruno Berselli, Oct 31 2012
a(0)=1, a(1)=1, a(2)=2, a(3)=0; for n>3, a(n) = -a(n-1) + a(n-3) + a(n-4). - Harvey P. Dale, Mar 13 2013
a(n) = 1 + (-1)^n/2 + (-1)^floor((2*n - 2)/3)/2. - Wesley Ivan Hurt, Apr 16 2014
a(n) = sign((n-3) mod 2) + sign((n-3) mod 3). - Wesley Ivan Hurt, Feb 04 2022
MAPLE
A117447:=n->1 + (-1)^n/2 + (-1)^floor((2*n - 2)/3)/2; seq(A117447(n), n=0..100); # Wesley Ivan Hurt, Apr 16 2014
MATHEMATICA
CoefficientList[Series[(1+2x+3x^2+x^3)/(1+x-x^3-x^4), {x, 0, 90}], x] (* or *) LinearRecurrence[{-1, 0, 1, 1}, {1, 1, 2, 0}, 90] (* Harvey P. Dale, Mar 13 2013 *)
CROSSREFS
Sequence in context: A068320 A111330 A225152 * A328775 A053250 A364259
KEYWORD
nonn,easy
AUTHOR
Paul Barry, Mar 16 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 May 17 19:53 EDT 2024. Contains 372607 sequences. (Running on oeis4.)