OFFSET
0,3
COMMENTS
Also (by taking the conjugate), a(n) is the number of partitions of n such that all parts, with the possible exception of the largest are repeated at most twice. - Geoffrey Critzer, Sep 30 2013
LINKS
Vaclav Kotesovec, Table of n, a(n) for n = 0..10000 (terms 0..1000 from Alois P. Heinz)
FORMULA
O.g.f.: 1 + sum(k>=1, x^k/(1-x^k) * prod(i=1..k-1, 1+x^i+x^(2*i) ) ). - Geoffrey Critzer, Sep 30 2013
a(n) = Sum_{k=0..2} A238353(n,k). - Alois P. Heinz, Mar 09 2014
a(n) ~ exp(2*Pi*sqrt(n)/3) / (6 * n^(3/4)). - Vaclav Kotesovec, Jan 26 2022
EXAMPLE
The a(7)=11 such partitions of 7 are
01: [ 1 1 1 1 1 1 1 ]
02: [ 2 1 1 1 1 1 ]
03: [ 2 2 1 1 1 ]
04: [ 2 2 2 1 ]
05: [ 3 1 1 1 1 ]
06: [ 3 2 1 1 ]
07: [ 3 2 2 ]
08: [ 3 3 1 ]
09: [ 4 2 1 ]
10: [ 4 3 ]
11: [ 7 ]
The a(7)=11 partitions with no part (excepting the largest) repeated more than twice are the conjugates of the above respectively:
01: [7]
02: [6 1]
03: [5 2]
04: [4 3]
05: [5 1 1]
06: [4 2 1]
07: [3 3 1]
08: [3 2 2]
09: [3 2 1 1]
10: [2 2 2 1]
11: [1 1 1 1 1 1 1]
MAPLE
b:= proc(n, i, t) option remember; `if`(n=0, 1, `if`(i<1, 0,
add(b(n-i*j, i-1, `if`(j>0, 0, 1)), j=t..n/i)))
end:
a:= n-> add(b(n, k, 1), k=0..n):
seq(a(n), n=0..70); # Alois P. Heinz, May 01 2013
MATHEMATICA
nn=53; CoefficientList[Series[1+Sum[x^k/(1-x^k)Product[1+x^i+x^(2i), {i, 1, k-1}], {k, 1, nn}], {x, 0, nn}], x] (* Geoffrey Critzer, Sep 30 2013 *)
b[n_, i_, t_] := b[n, i, t] = If[n == 0, 1, If[i<1, 0, Sum[b[n-i*j, i-1, If[j>0, 0, 1]], {j, t, n/i}]]]; a[n_] := Sum[b[n, k, 1], {k, 0, n}]; Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Jun 19 2015, after Alois P. Heinz *)
PROG
(PARI)
N=66; q = 'q + O('q^N);
Vec ( 1 + sum(k=1, N, q^k/(1-q^k) * prod(i=1, k-1, 1+q^i+q^(2*i) ) ) )
\\ Joerg Arndt, Mar 08 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Joerg Arndt, Apr 21 2013
STATUS
approved