OFFSET
0,2
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..500
Index entries for linear recurrences with constant coefficients, signature (4, -4, -2, 4, 0, -1)
FORMULA
From Andrew Howroyd, Aug 09 2018: (Start)
a(n) = Sum_{k=0..n} (k+1)*(Sum_{i=0..k} binomial(n-k, k-i)).
a(n) = 4*a(n-1) - 4*a(n-2) - 2*a(n-3) + 4*a(n-4) - a(n-6).
G.f.: (1 - x - x^3)/((1 - x)^2*(1 - x - x^2)^2).
(End)
EXAMPLE
a(3) = 17 = sum of row 3 terms of A131252: (7 + 6 + 3 + 1).
MATHEMATICA
LinearRecurrence[{4, -4, -2, 4, 0, -1}, {1, 3, 8, 17, 34, 64}, 40] (* Vincenzo Librandi, Aug 10 2018 *)
PROG
(PARI) Vec((1 - x - x^3)/((1 - x)^2*(1 - x - x^2)^2) + O(x^40)) \\ Andrew Howroyd, Aug 09 2018
(PARI) a(n)={sum(k=0, n, (k+1)*sum(i=0, k, binomial(n-k, k-i)))} \\ Andrew Howroyd, Aug 09 2018
(Magma) I:=[1, 3, 8, 17, 34, 64]; [n le 6 select I[n] else 4*Self(n-1)- 4*Self(n-2)-2*Self(n-3)+4*Self(n-4)-Self(n-6): n in [1..40]]; // Vincenzo Librandi, Aug 10 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Gary W. Adamson, Jun 23 2007
EXTENSIONS
Terms a(10) and beyond from Andrew Howroyd, Aug 09 2018
STATUS
approved