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
G.f.: 2*(13-17*x+7*x^2)/(1-x)^3. - Bruno Berselli, Mar 29 2013
a(n) = 3*n^2 + 15*n + 26. - Bruno Berselli, Mar 29 2013
E.g.f.: (26 + 18*x + 3*x^2)*exp(x). - G. C. Greubel, Aug 27 2019
a(n) = 3*a(n-1)-3*a(n-2)+a(n-3). - Wesley Ivan Hurt, Jan 27 2022
EXAMPLE
a(1) = 1*2 + 3*4 + 5*6 = 2 + 12 + 30 = 44.
MAPLE
seq((3*(2*n+5)^2 + 29)/4, n=0..50); # G. C. Greubel, Aug 27 2019
MATHEMATICA
Table[3n^2+15n+26, {n, 0, 50}] (* or *) LinearRecurrence[{3, -3, 1}, {26, 44, 68}, 50] (* Harvey P. Dale, Oct 09 2018 *)
PROG
(JavaScript)
for (j=0; j<50; j++) {
a=j*(j+1)+(j+2)*(j+3)+(j+4)*(j+5);
document.write(a+", ");
}
(PARI) a(n)=n*(n+1)+(n+2)*(n+3)+(n+4)*(n+5) \\ Charles R Greathouse IV, Jun 17 2017
(Magma) [(3*(2*n+5)^2 + 29)/4: n in [0..50]]; // G. C. Greubel, Aug 27 2019
(Sage) [(3*(2*n+5)^2 + 29)/4 for n in (0..50)] # G. C. Greubel, Aug 27 2019
(GAP) List([0..50], n-> (3*(2*n+5)^2 + 29)/4 ); # G. C. Greubel, Aug 27 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jon Perry, Mar 24 2013
STATUS
approved