OFFSET
0,3
COMMENTS
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
FORMULA
a(2k+1) = Sum_{j=0..k} c(j)*q(2k+1-2j), where c(j) = A011782(j), the number of compositions of j, and q(j) = A000009(j), the number of strict partitions of j.
a(2k) = Sum_{j=0..k} c(j)*q(2k - 2j).
a(n) = 2*a(n-2) + q(n) - q(n-2).
G.f.: (1 - x^2)/(1 - 2*x^2) * Product_{n>=1} (1 + x^n). - Peter Bala, Aug 03 2016
a(n) ~ c * 2^(n/2), where c = (QPochhammer[-1, 1/sqrt(2)] + (-1)^n*QPochhammer[-1, -1/sqrt(2)])/8, c = 2.002012668882683075956932277149607919866122388... if n is even and c = 1.8471591618236152130512812517147483461076894... if n is odd. - Vaclav Kotesovec, Jun 02 2018
EXAMPLE
The compositions enumerated by a(6) = 12 are (6), (5,1)=(1,5), (4,2), (2,4), (3,3), (4,1,1)=(1,4,1)=(1,1,4), (3,2,1)=(1,2,3)=(2,3,1)=(2,1,3)=(3,1,2)=(1,3,2), (2,2,2), (3,1,1,1)=(1,3,1,1)=(1,1,3,1)=(1,1,1,3), (2,2,1,1)=(2,1,2,1)=(2,1,1,2)=(1,2,1,2)=(1,1,2,2)=(1,2,2,1), (2,1,1,1,1)=(1,2,1,1,1)=(1,1,2,1,1,)=(1,1,1,2,1)=(1,1,1,1,2), (1,1,1,1,1,1).
The compositions enumerated by a(5) = 7 are (5), (4,1)=(1,4), (3,2)=(2,3), (3,1,1)=(1,3,1)=(1,1,3), (2,2,1)=(2,1,2)=(1,2,2), (2,1,1,1)=(1,2,1,1)=(1,1,2,1)=(1,1,1,2), (1,1,1,1,1).
MAPLE
b:= proc(n, i, p) option remember; (t-> `if`(n=0, p!,
`if`(i<1, 0, add(b(n-i*j, i-1, p+`if`(t, j, 0))/
`if`(t, j, 0)!, j=0..n/i))))(i::even)
end:
a:= n-> b(n$2, 0):
seq(a(n), n=0..50); # Alois P. Heinz, Aug 03 2016
MATHEMATICA
nmax = 40; CoefficientList[Series[(1 - x^2)/(1 - 2*x^2)*Product[(1 + x^k), {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Jun 02 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Gregory L. Simay, Aug 02 2016
STATUS
approved