|
|
A117413
|
|
Expansion of (1-x^2)/(1-2*x^2+4*x^3+x^4).
|
|
2
|
|
|
1, 0, 1, -4, 1, -12, 17, -24, 81, -104, 241, -508, 817, -1876, 3425, -6512, 13537, -24848, 49697, -97332, 185249, -368604, 710129, -1380872, 2709425, -5233656, 10232209, -19924140, 38689617, -75543460, 146843585, -285921248, 557171393, -1083673376, 2111184193, -4110111076
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
Diagonal sums of number triangle A117411.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 2*a(n-2) - 4*a(n-3) - a(n-4).
a(n) = Sum_{k=0..floor(n/2)} Sum_{j=0..n-2*k} C(n-k, k-j)*C(j, n-2*k)}*(-4)^(n-2*k).
|
|
MATHEMATICA
|
CoefficientList[Series[(1-x^2)/(1-2x^2+4x^3+x^4), {x, 0, 40}], x] (* or *) LinearRecurrence[{0, 2, -4, -1}, {1, 0, 1, -4}, 40] (* Harvey P. Dale, Jul 12 2017 *)
|
|
PROG
|
(Magma) I:=[1, 0, 1, -4]; [n le 4 select I[n] else 2*Self(n-1) -4*Self(n-2) -Self(n-3): n in [1..41]]; // G. C. Greubel, Sep 07 2022
(SageMath)
@CachedFunction
if(n<4): return (1, 0, 1, -4)[n]
else: return 2*a(n-2) - 4*a(n-3) - a(n-4)
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,sign
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|