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 (2,1,-2).
FORMULA
G.f.: (1+x^4)/((1-2*x)*(1-x^2)). - Ralf Stephan, Apr 30 2004
a(n) = (1/3)*(17*2^(n-2) + (-1)^n) - 1, n>=2. - R. J. Mathar, May 22 2013
a(n) = a(n-1) + 2*a(n-2) + 2. - Greg Dresden, Feb 22 2020
E.g.f.: (3 + 6*x - 8*cosh(x) + 17*cosh(2*x) - 16*sinh(x) + 17*sinh(2*x))/12. - Stefano Spezia, Feb 22 2020
MATHEMATICA
Table[(17*2^(n-2) +(-1)^n)/3 -1 +Boole[n==0]/4 +Boole[n==1]/2, {n, 0, 40}] (* G. C. Greubel, Jun 21 2024 *)
PROG
(Magma) [n le 1 select n+1 else (17*2^(n-2) +(-1)^n)/3 -1: n in [0..40]]; // G. C. Greubel, Jun 21 2024
(SageMath) [(17*2^(n-2) +(-1)^n)/3 -1 +int(n==0)/4 +int(n==1)/2 for n in range(41)] # G. C. Greubel, Jun 21 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved