OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Herbert S. Wilf, The number of maximal independent sets in a tree, SIAM Journal on Algebraic and Discrete Methods, volume 7, number 1, January 1986, pages 125-130. Also author's copy.
Index entries for linear recurrences with constant coefficients, signature (0,3,0,-2).
FORMULA
From Colin Barker, Sep 08 2013: (Start)
G.f.: -(x^4+x^3+x^2-x-1) / ((x-1)*(x+1)*(2*x^2-1)).
a(n) = 3*a(n-2)-2*a(n-4) for n > 4. (End)
MAPLE
f:=proc(n) if n=0 then 1
elif (n mod 2) = 0 then 2^((n/2)-1)+1 else 2^((n-1)/2); fi;
end;
MATHEMATICA
CoefficientList[Series[-(x^4 + x^3 + x^2 - x - 1) / ((x - 1) (x + 1) (2 x^2 - 1)), {x, 0, 60}], x] (* Vincenzo Librandi, Sep 09 2013 *)
PROG
(PARI) Vec(-(x^4+x^3+x^2-x-1)/((x-1)*(x+1)*(2*x^2-1)) + O(x^100)) \\ Colin Barker, Sep 08 2013
(Magma) I:=[1, 1, 2, 2, 3]; [n le 5 select I[n] else 3*Self(n-2)-2*Self(n-4): n in [1..55]]; // Vincenzo Librandi, Sep 09 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Sep 02 2013
STATUS
approved