OFFSET
1,2
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..500
Index entries for linear recurrences with constant coefficients, signature (21,-153,503,-786,576,-160).
FORMULA
a(n) = 10^n - (3*n + 1)*4^n + 3*n*(3*n + 1)/2. - Andrew Howroyd, May 06 2020
From Colin Barker, Jul 17 2020: (Start)
G.f.: 9*x^2*(1 + 24*x - 42*x^2 - 64*x^3) / ((1 - x)^3*(1 - 4*x)^2*(1 - 10*x)).
a(n) = 21*a(n-1) - 153*a(n-2) + 503*a(n-3) - 786*a(n-4) + 576*a(n-5) - 160*a(n-6) for n>6.
(End)
MATHEMATICA
T[n_, k_]:= T[n, k]= Sum[(-1)^(k-j)*Binomial[3*n+1, k-j+2]*(Binomial[j+1, 3])^n, {j, 0, k+2}];
Table[T[n, 2], {n, 30}] (* G. C. Greubel, Mar 26 2022 *)
PROG
(PARI) a(n) = {10^n - (3*n + 1)*4^n + 3*n*(3*n + 1)/2} \\ Andrew Howroyd, May 06 2020
(PARI) concat(0, Vec(9*x^2*(1 + 24*x - 42*x^2 - 64*x^3) / ((1 - x)^3*(1 - 4*x)^2*(1 - 10*x)) + O(x^40))) \\ Colin Barker, Jul 17 2020
(Sage)
@CachedFunction
def T(n, k): return sum( (-1)^(k-j)*binomial(3*n+1, k-j+2)*(binomial(j+1, 3))^n for j in (0..k+2) )
[T(n, 2) for n in (1..30)] # G. C. Greubel, Mar 26 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
R. H. Hardin, May 29 2009
EXTENSIONS
Terms a(10) and beyond from Andrew Howroyd, May 06 2020
STATUS
approved