OFFSET
1,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,3,-6,-1,2).
FORMULA
G.f.: x*(1-x+4*x^2-x^3-2*x^4)/((1-2*x)*(1+x-x^2)*(1-x-x^2)).
From G. C. Greubel, Jul 11 2025: (Start)
E.g.f.: 1 + 2*exp(2*x) - 2*cosh(x/2)*cosh(sqrt(5)*x/2) - exp(x/2)*(cosh(sqrt(5)*x/2) + sqrt(5)*sinh(sqrt(5)*x/2)). (End)
MATHEMATICA
LinearRecurrence[{2, 3, -6, -1, 2}, {1, 1, 9, 14, 46}, 41] (* G. C. Greubel, Jul 11 2025 *)
PROG
(Magma)
A027009:= func< n | 2^(n+1) -(Lucas(n+3) +(-1)^n*Lucas(n))/2 >;
[A027009(n): n in [1..40]]; // G. C. Greubel, Jul 11 2025
(SageMath)
def lucas(n): return lucas_number2(n, 1, -1)
def A027009(n): return 2^(n+1) -(lucas(n+3) +(-1)^n*lucas(n))//2
print([A027009(n) for n in range(1, 41)]) # G. C. Greubel, Jul 11 2025
(PARI) a(n)=([0, 1, 0, 0, 0; 0, 0, 1, 0, 0; 0, 0, 0, 1, 0; 0, 0, 0, 0, 1; 2, -1, -6, 3, 2]^(n-1)*[1; 1; 9; 14; 46])[1, 1] \\ Charles R Greathouse IV, Jun 02 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms added by G. C. Greubel, Jul 11 2025
STATUS
approved
