OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,6,-6).
FORMULA
a(n) = Sum_{i=0..2*n} Sum_{j=0..i} A026552(i, j).
G.f.: (1+3*x+3*x^2)/((1-x)*(1-6*x^2)). - Ralf Stephan, Feb 03 2004
a(n) = 6*a(n-2) + 7. - Philippe Deléham, Feb 24 2014
a(2*k) = A233325(k). - Philippe Deléham, Feb 24 2014
From Colin Barker, Nov 25 2016: (Start)
a(n) = (2^(n/2+2) * 3^(n/2+1) - 7)/5 for n even.
a(n) = (2^((n-1)/2) * 3^((n+5)/2) - 7)/5 for n odd. (End)
a(n) = (1/10)*(2*(1+(-1)^n)*6^((n+2)/2) + 27*(1-(-1)^n)*6^((n-1)/2) - 14). - G. C. Greubel, Dec 19 2021
MATHEMATICA
CoefficientList[Series[(1 +3x +3x^2)/((1-x)(1-6x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Feb 25 2014 *)
LinearRecurrence[{1, 6, -6}, {1, 4, 13}, 30] (* Harvey P. Dale, Aug 23 2014 *)
PROG
(Magma) [Truncate((2*(1+(-1)^n)*6^((n+2)/2) + 27*(1-(-1)^n)*6^((n-1)/2) -14)/10): n in [0..40]]; // G. C. Greubel, Dec 19 2021
(Sage) [(1/10)*(2*(1+(-1)^n)*6^((n+2)/2) +27*(1-(-1)^n)*6^((n-1)/2) -14) for n in (0..40)] # G. C. Greubel, Dec 19 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved