A239955 Number of partitions p of n such that (number of distinct parts of p) <= max(p) - min(p).
0, 0, 0, 0, 1, 2, 4, 7, 12, 17, 27, 38, 54, 75, 104, 137, 187, 245, 322, 418, 542, 691, 887, 1121, 1417, 1777, 2228, 2767, 3441, 4247, 5235, 6424, 7871, 9594, 11688, 14173, 17168, 20723, 24979, 30008, 36010, 43085, 51479, 61357, 73032, 86718, 102852, 121718
Offset: 0
Examples
a(6) counts these 4 partitions: 51, 42, 411, 3111.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..10000 (first 201 terms from John Tyler Rascoe)
Crossrefs
Programs
-
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*) (* second program *) Table[Length[Select[IntegerPartitions[n],Min@@Differences[#]<-1&]],{n,0,30}] (* Gus Wiseman, Jun 26 2022 *)
-
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
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
Comments