A027271 a(n) = Sum_{k=0..2n} (k+1)*T(n,k), where T is given by A026536.
1, 4, 18, 48, 180, 432, 1512, 3456, 11664, 25920, 85536, 186624, 606528, 1306368, 4199040, 8957952, 28553472, 60466176, 191476224, 403107840, 1269789696, 2660511744, 8344332288, 17414258688, 54419558400, 113192681472, 352638738432, 731398864896, 2272560758784
Offset: 0
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).
Programs
-
Magma
[Round(6^(n/2)*( 3*((n+1) mod 2) + Sqrt(6)*(n mod 2) )*(n+1)/3): n in [0..40]]; // G. C. Greubel, Apr 12 2022
-
Mathematica
T[n_, k_]:= T[n, k]= If[k==0 || k==2*n, 1, If[k==1 || k==2*n-1, Floor[n/2], If[EvenQ[n], T[n-1, k-2] +T[n-1, k-1] +T[n-1, k], T[n-1, k-2] +T[n-1, k]] ]]; A027271[n_]:= A027271[n]= Sum[(k+1)*T[n,k], {k,0,2*n}]; Table[A027271[n], {n,0,40}] (* G. C. Greubel, Apr 12 2022 *)
-
PARI
A027271(n)=my(b(n)=if(!bittest(n,0),n\2*6^(n\2-1)));4*b(n+1)+b(n+2)+6*b(n) \\ could be made more efficient and explicit by simplifying the formula for n even and for n odd separately. - M. F. Hasler, Sep 29 2012
-
SageMath
[6^(n/2)*( 3*((n+1)%2) + sqrt(6)*(n%2) )*(n+1)/3 for n in (0..40)] # G. C. Greubel, Apr 12 2022
Formula
From Paul Barry, Mar 03 2004: (Start)
G.f.: (1+4*x+6*x^2)/(1-6*x^2)^2 = (d/dx)((1+3*x)/(1-6*x^2)).
a(n) = 6^(n/2)*((3-sqrt(6))*(-1)^n + (3+sqrt(6)))*(n+1)/6. (End)
a(n) = 4*b(n) + b(n+1) + 6*b(n-1) with b(n)= 0, 1, 0, 12, 0, 108, 0, 864, ... (aerated A053469). - R. J. Mathar, Sep 29 2012
E.g.f.: (1 + 2*x)*cosh(sqrt(6)*x) + sqrt(2/3)*(1 + 3*x)*sinh(sqrt(6)*x). - Stefano Spezia, May 07 2023