OFFSET
1,1
COMMENTS
Column two of the associated matrix is A005803.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (4,-2,-10,15,-6).
FORMULA
From G. C. Greubel, Feb 07 2022: (Start)
a(n) = (1/4)*(110 + 26*n + 2^(n+8) - (1 - (-1)^n)*106*3^((n+1)/2) - (1 + (-1)^n)*61*3^(1+n/2)).
a(2*n) = (1/2)*(55 + 26*n + 2^(2*n+7) - 61*3^(n+1)).
a(2*n+1) = (1/2)*(68 + 26*n + 4^(n+4) - 106*3^(n+1)).
G.f.: x*(3 + 10*x)/((1-x)^2*(1 - 2*x - 3*x^2 + 6*x^3)).
E.g.f.: (1/2)*( (55 + 13*x)*exp(x) + 128*exp(2*x) - 183*cosh(sqrt(3)*x) - 106*sqrt(3)*sinh(sqrt(3)*x) ). (End)
MATHEMATICA
LinearRecurrence[{4, -2, -10, 15, -6}, {3, 22, 82, 254, 677}, 40] (* G. C. Greubel, Feb 07 2022 *)
PROG
(Magma) [(1/12)*(330 +78*n +3*2^(n+8) -(1-(-1)^n)*106*3^((n+3)/2) -(1+(-1)^n)*61*3^(2 +n/2)): n in [1..40]]; // G. C. Greubel, Feb 07 2022
(SageMath)
def a(n):
if (n%2==0): return (1/2)*(55 + 13*n + 2^(n+7) -61*3^(n/2+1))
else: return (1/2)*(55 + 13*n + 2^(n+7) - 106*3^((n+1)/2))
[a(n) for n in (1..40)] # G. C. Greubel, Feb 07 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
John W. Layman, Nov 30 2007
EXTENSIONS
Terms a(14) onward added by G. C. Greubel, Feb 07 2022
STATUS
approved