OFFSET
0,1
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,4,-4).
FORMULA
From Andrew Howroyd, Jan 03 2020: (Start)
a(n) = 2^(n + (-1)^n) + 1.
a(n) = a(n-1) + 4*a(n-2) - 4*a(n-3) for n >= 3.
G.f.: (3 - x - 5*x^2)/((1 - x)*(1 - 2*x)*(1 + 2*x)). (End)
PROG
(PARI) a(n)={(1<<bitxor(n, 1)) + 1} \\ Andrew Howroyd, Jan 03 2020
(PARI) Vec((3 - x - 5*x^2)/((1 - x)*(1 - 2*x)*(1 + 2*x)) + O(x^40)) \\ Andrew Howroyd, Jan 03 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Jul 06 2008
EXTENSIONS
Terms a(16) and beyond from Andrew Howroyd, Jan 03 2020
STATUS
approved