OFFSET
0,5
COMMENTS
a(n) = A116373(3*n). - Reinhard Zumkeller, Feb 15 2006
LINKS
Alois P. Heinz and Vaclav Kotesovec, Table of n, a(n) for n = 0..10000 (terms 0..1000 from Alois P. Heinz)
Joerg Arndt, Matters Computational (The Fxtbook), p. 350.
FORMULA
a(n) = 1/n*Sum_{k=1..n} A078181(k)*a(n-k), a(0) = 1.
G.f.: 1/prod(j>=0, 1-x^(1+3*j) ). - Emeric Deutsch, Mar 30 2006
From Joerg Arndt, Oct 02 2012: (Start)
G.f.: sum(n>=0, q^n/prod(k=1..n, 1-q^(3*k)) ); this is the special case of R=1, M=3 of the g.f. sum(n>=0, q^(R*n)/prod(k=1..n, 1-q^(M*k) ) ) for partitions into parts R mod M (where R!=0).
G.f. sum(n>=0, q^(3*n^2-2*n) / prod(k=0..n-1, (1-q^(3*k+3))*(1-q^(3*k+1))) ); this is the special case of R=1, M=3 of the g.f. sum(n>=0, q^(M*n^2+(R-M)*n) / prod(k=0..n-1, (1-q^(M*k+M))*(1-q^(M*k+R))) ) for partitions into parts R mod M (where R!=0). (See Fxtbook link)
(End)
a(n) ~ Gamma(1/3) * exp(sqrt(2*n)*Pi/3) / (2*sqrt(3) * (2*Pi*n)^(2/3)) * (1 + (Pi/72 - 2/(3*Pi)) / sqrt(2*n)). - Vaclav Kotesovec, Feb 26 2015, extended Jan 24 2017
Euler transform of period 3 sequence [ 1, 0, 0, ...]. - Kevin T. Acres, Apr 28 2018
EXAMPLE
a(3) = 1 because we have [1,1,1];
a(4) = 2 because we have [1,1,1,1] and [4];
a(9) = 4 because we have [7,1,1], [4,4,1], [4,1,1,1,1,1] and [1,1,1,1,1,1,1,1,1].
1 + x + x^2 + x^3 + 2*x^4 + 2*x^5 + 2*x^6 + 3*x^7 + 4*x^8 + 4*x^9 + ...
MAPLE
g:= 1/product(1-x^(1+3*j), j=0..50): gser:= series(g, x=0, 64): seq(coeff(gser, x, n), n=0..61); # Emeric Deutsch, Mar 30 2006
# second Maple program
b:= proc(n, i) option remember; `if`(n=0, 1,
`if`(i<1, 0, b(n, i-3) +`if`(i>n, 0, b(n-i, i))))
end:
a:= n-> b(n, 3*iquo(n, 3)+1):
seq(a(n), n=0..100); # Alois P. Heinz, Oct 03 2012
MATHEMATICA
b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-3] + If[i>n, 0, b[n-i, i]]]]; a[n_] := b[n, 3*Quotient[n, 3]+1]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Mar 23 2015, after Alois P. Heinz *)
nmax = 100; poly = ConstantArray[0, nmax + 1]; poly[[1]] = 1; poly[[2]] = -1; Do[If[Mod[k, 3] == 1, Do[poly[[j + 1]] -= poly[[j - k + 1]], {j, nmax, k, -1}]; ], {k, 2, nmax}]; poly2 = Take[poly, {2, nmax + 1}]; poly3 = 1 + Sum[poly2[[n]]*x^n, {n, 1, Length[poly2]}]; CoefficientList[Series[1/poly3, {x, 0, Length[poly2]}], x] (* Vaclav Kotesovec, Jan 13 2017 *)
nmax = 50; s = Range[0, nmax/3]*3 + 1;
Table[Count[IntegerPartitions@n, x_ /; SubsetQ[s, x]], {n, 0, nmax}] (* Robert Price, Aug 05 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved