OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,4,0,-4)
FORMULA
G.f.: -(2*x^4-x^3-3*x^2+x+1)/(-4*x^4+4*x^2-1).
From Colin Barker, May 07 2016: (Start)
a(n) = 2^((n-7)/2+5/2) for n>0 and even.
a(n) = 2^((n-7)/2)*(2*n+6) for n>0 and odd.
a(n) = 4*a(n-2)-4*a(n-4) for n>4.
(End)
EXAMPLE
a(3) = 3: [3], [1,2], [2,1].
a(4) = 2: [4], [2,2].
a(5) = 8: [5], [3,2], [2,3], [1,4], [4,1], [1,2,2], [2,1,2], [2,2,1].
a(6) = 4: [6], [4,2], [2,4], [2,2,2].
a(8) = 8: [8], [4,4], [2,6], [6,2], [2,2,4], [4,2,2], [2,4,2], [2,2,2,2].
MAPLE
a:= n-> `if`(n<2, 1, 2^iquo(n-2, 2) *
`if`(irem(n, 2)=0, 1, iquo(n+3, 2))):
seq(a(n), n=0..60);
PROG
(PARI) Vec((1-x)^2*(1+x)*(1+2*x)/(1-2*x^2)^2 + O(x^50)) \\ Colin Barker, May 07 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Jan 30 2013
STATUS
approved