OFFSET
1,2
COMMENTS
Also, partitions of n in which any two distinct parts differ by at least 3. Example: a(5) = 3 because we have [5], [4,1] and [1,1,1,1,1].
LINKS
Vaclav Kotesovec, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Alois P. Heinz)
FORMULA
G.f.: sum(x^k*product(1+x^(3j)/(1-x^j), j=1..k-1)/(1-x^k), k=1..infinity). More generally, the g.f. of partitions of n in which each part, with the possible exception of the largest, occurs at least b times, is sum(x^k*product(1+x^(bj)/(1-x^j), j=1..k-1)/(1-x^k), k=1..infinity). It is also the g.f. of partitions of n in which any two distinct parts differ by at least b.
log(a(n)) ~ sqrt((2*Pi^2/3 + 4*c)*n), where c = Integral_{0..infinity} log(1 - exp(-x) + exp(-3*x)) dx = -0.77271248407593487127235205445116662610863126869... - Vaclav Kotesovec, Jan 28 2022
EXAMPLE
a(5) = 3 because we have [5], [2,1,1,1] and [1,1,1,1,1].
MAPLE
g:=sum(x^k*product(1+x^(3*j)/(1-x^j), j=1..k-1)/(1-x^k), k=1..70): gser:=series(g, x=0, 62): seq(coeff(gser, x^n), n=1..58);
# second Maple program
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
b(n, i-1) +add(b(n-i*j, i-3), j=1..n/i)))
end:
a:= n-> b(n, n):
seq(a(n), n=1..70); # Alois P. Heinz, Nov 04 2012
MATHEMATICA
b[n_, i_] := b[n, i] = If[n == 0, 1, If[i<1, 0, b[n, i-1] + Sum[b[n-i*j, i-3], {j, 1, n/i}]]]; a[n_] := b[n, n]; Table[a[n], {n, 1, 70}] (* Jean-François Alcover, May 26 2015, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Feb 27 2006
STATUS
approved