OFFSET
0,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
From Bruno Berselli, Mar 29 2013: (Start)
G.f.: 4*(17-26*x+11*x^2)/(1-x)^3.
a(n) = 4*n^2 + 28*n + 68.
E.g.f.: 4*(17 +8*x +x^2)*exp(x). - G. C. Greubel, Aug 27 2019
EXAMPLE
a(1) = 1*2 + 3*4 + 5*6 + 7*8 = 2 + 12 + 30 + 56 = 100.
MAPLE
seq((2*n+7)^2+19, n=0..50); # G. C. Greubel, Aug 27 2019
MATHEMATICA
(2*Range[50] +5)^2 +19 (* G. C. Greubel, Aug 27 2019 *)
Table[4n^2+28n+68, {n, 0, 50}] (* or *) LinearRecurrence[{3, -3, 1}, {68, 100, 140}, 50] (* Harvey P. Dale, Jan 15 2020 *)
PROG
(JavaScript)
for (j=0; j<50; j++) {
a=j*(j+1)+(j+2)*(j+3)+(j+4)*(j+5)+(j+6)*(j+7);
document.write(a+", ");
}
(PARI) a(n)=4*n^2+28*n+68 \\ Charles R Greathouse IV, Jun 17 2017
(Magma) [(2*n+7)^2+19: n in [0..50]]; // G. C. Greubel, Aug 27 2019
(Sage) [(2*n+7)^2+19 for n in (0..50)] # G. C. Greubel, Aug 27 2019
(GAP) List([0..50], n-> (2*n+7)^2+19); # G. C. Greubel, Aug 27 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jon Perry, Mar 24 2013
STATUS
approved