OFFSET
0,6
COMMENTS
From Gus Wiseman, Jun 26 2022: (Start)
Also the number of partitions of n with at least one gap, i.e., partitions whose parts do not form a contiguous interval. These partitions are ranked by A073492. For example, the a(0) = 0 through a(8) = 12 partitions are:
. . . . (31) (41) (42) (52) (53)
(311) (51) (61) (62)
(411) (331) (71)
(3111) (421) (422)
(511) (431)
(4111) (521)
(31111) (611)
(3311)
(4211)
(5111)
(41111)
(311111)
Also the number of non-constant partitions of n with a repeated non-maximal part, ranked by A065201. The a(0) = 0 through a(8) = 12 partitions are:
. . . . (211) (311) (411) (322) (422)
(2111) (2211) (511) (611)
(3111) (3211) (3221)
(21111) (4111) (3311)
(22111) (4211)
(31111) (5111)
(211111) (22211)
(32111)
(41111)
(221111)
(311111)
(2111111)
(End)
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000 (first 201 terms from John Tyler Rascoe)
FORMULA
G.f.: Sum_{i>1} q^i/(q;q)_{i-1} * Sum_{j=1..i-1} (q^2;q^2)_{j-2} where (a;q)_k = Product_{i>=0..k} (1-a*q^i). - John Tyler Rascoe, Aug 16 2025
EXAMPLE
a(6) counts these 4 partitions: 51, 42, 411, 3111.
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1,
`if`(i<1, 0, add(b(n-i*j, i-1), j=1..n/i)))
end:
a:= n-> combinat[numbpart](n)-add(b(n, k), k=0..n):
seq(a(n), n=0..47); # Alois P. Heinz, Aug 18 2025
MATHEMATICA
z = 60; d[p_] := d[p] = Length[DeleteDuplicates[p]]; f[p_] := f[p] = Max[p] - Min[p]; g[n_] := g[n] = IntegerPartitions[n];
Table[Count[g[n], p_ /; d[p] < f[p]], {n, 0, z}] (*A239954*)
Table[Count[g[n], p_ /; d[p] <= f[p]], {n, 0, z}] (*A239955*)
Table[Count[g[n], p_ /; d[p] == f[p]], {n, 0, z}] (*A239956*)
Table[Count[g[n], p_ /; d[p] > f[p]], {n, 0, z}] (*A034296*)
Table[Count[g[n], p_ /; d[p] >= f[p]], {n, 0, z}] (*A239958*)
(* Alternative: *)
Table[Length[Select[IntegerPartitions[n], Min@@Differences[#]<-1&]], {n, 0, 30}] (* Gus Wiseman, Jun 26 2022 *)
PROG
(PARI)
qs(a, q, n) = {prod(k=0, n, 1-a*q^k)}
A_q(N) = {if(N<4, vector(N+1, i, 0), my(q='q+O('q^(N-2)), g= sum(i=2, N+1, q^i/qs(q, q, i-1)*sum(j=1, i-1, q^(2*j)*qs(q^2, q^2, j-2)))); concat([0, 0, 0, 0], Vec(g)))} \\ John Tyler Rascoe, Aug 16 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Mar 30 2014
STATUS
approved
