cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A239956 Number of partitions p of n such that (number of distinct parts of p) = max(p) - min(p).

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 2, 3, 6, 5, 10, 12, 16, 21, 28, 30, 45, 53, 63, 81, 99, 114, 144, 173, 204, 245, 293, 340, 410, 482, 554, 662, 774, 890, 1044, 1207, 1393, 1619, 1864, 2134, 2464, 2828, 3220, 3701, 4223, 4789, 5474, 6223, 7050, 8004, 9058, 10230, 11579
Offset: 0

Views

Author

Clark Kimberling, Mar 30 2014

Keywords

Examples

			a(8) counts these 6 partitions:  53, 431, 422, 4211, 3311, 311111.
		

Crossrefs

Programs

  • 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}] (* this sequence *)
    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 *)
  • PARI
    A_x(N) = {my(x='x+O('x^N), g = sum(m=1,N, sum(i=m+2,N, x^(i+m)/((1-x^i)*(1-x^m)) * sum(j=m+1,i-1, (1-x^j)/(x^j) * prod(k=m+1,i-1, (x^k/(1-x^k)))))));
    concat([0,0,0,0],Vec(g))}
    A_x(51) \\ John Tyler Rascoe, Mar 16 2024

Formula

A239954(n) + a(n) + A034296(n) = A000041(n) for n >= 1.
G.f.: Sum_{m>0} A(x,m), where A(x,m) = Sum_{i>m+1} x^(i+m)/((1-x^i)*(1-x^m)) * Sum_{j=m+1..i-1} ( (1-x^j)/(x^j) * Product_{k=m+1..i-1} (x^k/(1-x^k)) ) is the g.f. for partitions of this kind with min(p) = m. - John Tyler Rascoe, Mar 16 2024