OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,12,0,-36).
FORMULA
a(n) = Sum_{k=0..2n} (k+1) * A026519(n, k).
G.f.: (1+6*x+6*x^2)/(1-6*x^2)^2.
a(n) = 12*a(n-2) - 36*a(n-4), with a(0)=1, a(1)=6, a(2)=18, a(3)=72. - Harvey P. Dale, Jun 19 2015
a(n) = ((n+1)/2)*6^((n-1)/2)*( 3*(1-(-1)^n) + sqrt(6)*(1+(-1)^n) ). - G. C. Greubel, Dec 21 2021
MATHEMATICA
CoefficientList[Series[(1+6x+6x^2)/(1-6x^2)^2, {x, 0, 30}], x] (* or *) LinearRecurrence[{0, 12, 0, -36}, {1, 6, 18, 72}, 30] (* Harvey P. Dale, Jun 19 2015 *)
PROG
(Magma) I:=[1, 6, 18, 72]; [n le 4 select I[n] else 12*(Self(n-2) - 3*Self(n-4)): n in [1..41]]; // G. C. Greubel, Dec 21 2021
(Sage) [((n+1)/2)*6^((n-1)/2)*( 3*(1-(-1)^n) + sqrt(6)*(1+(-1)^n) ) for n in (0..40)] # G. C. Greubel, Dec 21 2021
(PARI) a(n)=([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; -36, 0, 12, 0]^n*[1; 6; 18; 72])[1, 1] \\ Charles R Greathouse IV, Oct 18 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved