OFFSET
0,4
COMMENTS
Essentially a duplicate of A000079. - N. J. A. Sloane, Oct 15 2009
a(n) is the number of compositions of n into an odd number of parts.
Also 0 together with A011782. - Omar E. Pol, Oct 28 2013
Inverse INVERT transform of A001519. - R. J. Mathar, Dec 08 2022
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..3317
Index entries for linear recurrences with constant coefficients, signature (2).
FORMULA
a(n) = A000079(n-1) for n > 0.
O.g.f.: x*(1 - x) / (1 - 2*x) = x / (1 - x / (1 - x)).
a(n) = (1-n) * a(n-1) + 2 * Sum_{k=1..n-1} a(k) * a(n-k) if n>1. - Michael Somos, Jul 23 2011
E.g.f.: (exp(2*x) + 2*x - 1)/4. - Stefano Spezia, Aug 07 2022
EXAMPLE
G.f. = x + x^2 + 2*x^3 + 4*x^4 + 8*x^5 + 16*x^6 + 32*x^7 + 64*x^8 + 128*x^9 + ...
MAPLE
a:= n-> `if`(n<2, n, 2^(n-2)):
seq(a(n), n=0..40); # Alois P. Heinz, Jun 02 2021
MATHEMATICA
a[0] = 0; a[1] = 1; a[n_] := a[n] = Plus @@ Array[a, n - 1]; Array[a, 35, 0]
PROG
(Magma) [n le 1 select n else 2^(n-2): n in [0..40]]; // G. C. Greubel, Jul 27 2024
(SageMath) [(2^n +2*int(n==1) -int(n==0))/4 for n in range(41)] # G. C. Greubel, Jul 27 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Robert G. Wilson v, Oct 13 2009
STATUS
approved