Wolfram Research

Function Repository Resource:

SmallestPartsFunction

Source Notebook

Total number of smallest parts in the partitions of a positive integer

Contributed by: George Beck

ResourceFunction["SmallestPartsFunction"][n]

gives the total number of smallest parts in the integer partitions of the positive integer n.

Details and Options

A partition of n is a list of weakly decreasing positive integers that add up to n. For instance, written compactly, these are the five partitions of 4: 4, 31, 22, 211, 1111.

Examples

Basic Examples

Here is an illustrative example:

In[1]:=
ResourceFunction["SmallestPartsFunction"][3]
Out[1]=

The integer partitions of 3:

In[2]:=
IntegerPartitions@3
Out[2]=

The smallest parts:

In[3]:=
Min /@ IntegerPartitions@3
Out[3]=

The number of smallest parts per partition:

In[4]:=
Count[#, Min[#]] & /@ IntegerPartitions@3
Out[4]=

Their total:

In[5]:=
Total@%
Out[5]=

Here are the first 10 numbers in the smallest part function (spt) sequence:

In[6]:=
ResourceFunction["SmallestPartsFunction"] /@ Range@10
Out[6]=

Neat Examples

The function spt(n) satisfies some congruences similar to Ramanujan’s congruences for the partition function p(n).

Numbers of the form 5n+4 have spt divisible by 5:

In[7]:=
Table[ResourceFunction["SmallestPartsFunction"][5 n + 4], {n, 10}]
Out[7]=

Numbers of the form 7n+5 have spt divisible by 7:

In[8]:=
1/7 Table[ResourceFunction["SmallestPartsFunction"][7 n + 5], {n, 7}]
Out[8]=

Numbers of the form 13n+6 have spt divisible by 13:

In[9]:=
1/13 Table[
  ResourceFunction["SmallestPartsFunction"][13 n + 6], {n, 4}]
Out[9]=

Resource History

See Also

License Information