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 (0,20).
FORMULA
a(n) = (-2*sqrt(5))^n*(1/2 + 3*sqrt(5)/10) + (2*sqrt(5))^n*(1/2 - 3*sqrt(5)/10).
From G. C. Greubel, Apr 21 2023: (Start)
a(n) = (2*sqrt(5))^(n-1) * (-3*(1-(-1)^n) + sqrt(5)*(1+(-1)^n)).
E.g.f.: cosh(2*sqrt(5)*x) - (3/sqrt(5))*sinh(2*sqrt(5)*x). (End)
MATHEMATICA
LinearRecurrence[{0, 20}, {1, -6}, 41] (* G. C. Greubel, Apr 21 2023 *)
CoefficientList[Series[(1-6x)/(1-20x^2), {x, 0, 30}], x] (* Harvey P. Dale, Dec 02 2023 *)
PROG
(Magma) [n le 2 select 8-7*n else 20*Self(n-2): n in [1..41]]; // G. C. Greubel, Apr 21 2023
(SageMath)
def A099840(n): return 2*(2*sqrt(5))^(n-1)*(-3*(n%2) + sqrt(5)*((n+1)%2))
[A099840(n) for n in range(41)] # G. C. Greubel, Apr 21 2023
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Paul Barry, Oct 27 2004
STATUS
approved