OFFSET
1,2
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..500
Index entries for linear recurrences with constant coefficients, signature (45,-570,2822,-5481,4557,-1372).
FORMULA
a(n) = 28^n - (6*n + 1)*7^n + 3*n*(6*n + 1). - Andrew Howroyd, May 06 2020
From Colin Barker, Jul 18 2020: (Start)
G.f.: 9*x^2*(25 + 609*x - 2121*x^2 - 2401*x^3) / ((1 - x)^3*(1 - 7*x)^2*(1 - 28*x)).
a(n) = 45*a(n-1) - 570*a(n-2) + 2822*a(n-3) - 5481*a(n-4) + 4557*a(n-5) - 1372*a(n-6) for n>6. (End)
From G. C. Greubel, Sep 12 2022: (Start)
a(n) = Sum_{j=0..2} (-1)^j*binomial(6*n+1, j)*binomial(8-j, 6)^n.
E.g.f.: exp(28*x) - (1 + 42*x)*exp(7*x) + 3*x*(7 + 6*x)*exp(x). (End)
MATHEMATICA
Table[Sum[(-1)^j*Binomial[6*n+1, j]*Binomial[8-j, 6]^n, {j, 0, 2}], {n, 30}] (* G. C. Greubel, Sep 12 2022 *)
PROG
(PARI) a(n) = {28^n - (6*n + 1)*7^n + 3*n*(6*n + 1)} \\ Andrew Howroyd, May 06 2020
(PARI) concat(0, Vec(9*x^2*(25 + 609*x - 2121*x^2 - 2401*x^3) / ((1 - x)^3*(1 - 7*x)^2*(1 - 28*x)) + O(x^20))) \\ Colin Barker, Jul 18 2020
(Magma) [(&+[(-1)^j*Binomial(6*n+1, j)*Binomial(8-j, 6)^n: j in [0..2]]): n in [1..30]]; // G. C. Greubel, Sep 12 2022
(SageMath)
def A151651(n): return sum((-1)^j*binomial(6*n+1, j)*binomial(8-j, 6)^n for j in (0..2))
[A151651(n) for n in (1..30)] # G. C. Greubel, Sep 12 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
R. H. Hardin, May 29 2009
EXTENSIONS
Terms a(7) and beyond from Andrew Howroyd, May 06 2020
STATUS
approved