|
|
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
|
|
MAPLE
|
|
|
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
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|