OFFSET
0,6
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,8,-11,8,-6,4,-1).
FORMULA
G.f.: x^4/(1-2*x+x^2-2*x^3+x^4)^2.
EXAMPLE
a(5) = 4 because we have 01010, 01011, 00101 and 10101.
MAPLE
g:=z^4/(1-2*z+z^2-2*z^3+z^4)^2: gser:=series(g, z=0, 40): seq(coeff(gser, z, n), n=0..35);
MATHEMATICA
LinearRecurrence[{4, -6, 8, -11, 8, -6, 4, -1}, {0, 0, 0, 0, 1, 4, 10, 24}, 40] (* G. C. Greubel, Jan 14 2022 *)
PROG
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); [0, 0, 0, 0] cat Coefficients(R!( x^4/(1 -2*x +x^2 -2*x^3 +x^4)^2 )); // G. C. Greubel, Jan 14 2022
(Sage)
@CachedFunction
def A112575(n): return sum((-1)^k*binomial(n-k, k)*lucas_number1(n-2*k, 2, -1) for k in (0..(n/2)))
[A118871(n) for n in (0..40)] # G. C. Greubel, Jan 14 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, May 03 2006
STATUS
approved