OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,13,4,-4).
FORMULA
a(n) = (2^n - (-1)^n)*( (1+sqrt(2))^n - (1-sqrt(2))^n )/(6*sqrt(2)).
G.f.: x*(1-2*x^2)/((1+2*x-x^2)*(1-4*x-4*x^2)). - Colin Barker, May 01 2012
MATHEMATICA
LinearRecurrence[{2, 13, 4, -4}, {0, 1, 2, 15}, 41] (* G. C. Greubel, Oct 11 2022 *)
PROG
(Magma) [0] cat [(2^n-(-1)^n)*Evaluate(DicksonSecond(n-1, -1), 2)/3: n in [1..40]]; // G. C. Greubel, Oct 11 2022
(SageMath)
def A084169(n): return (2^n-(-1)^n)*lucas_number1(n, 2, -1)/3
[A084169(n) for n in range(41)] # G. C. Greubel, Oct 11 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Barry, May 18 2003
STATUS
approved