OFFSET
0,3
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,0,-6,4).
FORMULA
From Colin Barker, Jul 09 2016: (Start)
a(n) = (-1+2^n+2^((n-3)/2)*(-1+(-1)^n)).
a(n) = 2^n-1 for n even.
a(n) = 2^n-1-2^((n-1)/2) for n odd.
a(n) = 3*a(n-1)-6*a(n-3)+4*a(n-4) for n>3.
G.f.: x^2*(3-4*x) / ((1-x)*(1-2*x)*(1-2*x^2)).
(End)
MATHEMATICA
LinearRecurrence[{3, 0, -6, 4}, {0, 0, 3, 5}, 50] (* Paolo Xausa, Oct 21 2024 *)
PROG
(PARI) concat([0, 0], Vec(x^2*(3-4*x)/((1-x)*(1-2*x)*(1-2*x^2)) + O(x^40))) \\ Colin Barker, Jul 09 2016
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
N. J. A. Sloane, Jul 08 2016
STATUS
approved