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.

A360072 Number of pairs of positive integers (k,i) such that k >= i and there exists an integer partition of n of length k with i distinct parts.

Original entry on oeis.org

0, 1, 2, 3, 5, 5, 9, 9, 13, 14, 18, 19, 26, 25, 30, 34, 39, 40, 48, 48, 56, 59, 64, 67, 78, 78, 84, 89, 97, 99, 111, 111, 121, 125, 131, 137, 149, 149, 158, 165, 176, 177, 190, 191, 202, 210, 216, 222, 238, 239, 250, 256, 266, 270, 284, 289, 302, 307, 316, 323
Offset: 0

Views

Author

Gus Wiseman, Jan 28 2023

Keywords

Comments

This is the number of nonzero terms in the n-th triangle of A360071.

Examples

			The a(5) = 5 pairs are: (1,1), (2,2), (3,2), (4,2), (5,1). The pair (3,3) is absent because it is not possible to partition 5 into 3 parts, all 3 of which are distinct.
The a(6) = 9 pairs are: (1,1), (2,1), (2,2), (3,1), (3,2), (3,3), (4,2), (5,2), (6,1). The pair (3,3) is present because (3,2,1) is a partition of 6 into 3 parts, all 3 of which are distinct.
		

Crossrefs

A000041 counts integer partitions, strict A000009.
A008284 counts partitions by number of parts, reverse A058398.
A116608 counts partitions by number of distinct parts.

Programs

  • Mathematica
    Table[Count[Flatten[Sign[Table[Length[Select[IntegerPartitions[n], Length[#]==k&&Length[Union[#]]==i&]],{k,1,n},{i,1,k}]]],1],{n,0,30}]
  • PARI
    a(n) = if(n < 1, 0, numdiv(n) + sum(k=2, (sqrtint(8*n+1)-1)\2, n-binomial(k+1,2)+1)) \\ Andrew Howroyd, Jan 30 2023

Formula

a(n) = A000005(n) + Sum_{k=2..floor((sqrt(8*n+1)-1)/2)} (1 + n - binomial(k+1,2)) for n > 0. - Andrew Howroyd, Jan 30 2023

Extensions

Terms a(31) and beyond from Andrew Howroyd, Jan 30 2023