# Wolfram Function Repository

Instant-use add-on functions for the Wolfram Language

Function Repository Resource:

Map a distinct integer partition into another, reversing the parity of the number of parts, with one exception for each integer

Contributed by:
George Beck

ResourceFunction["FranklinBijection"][ maps a distinct partition |

A partition of an integer *n* is a list of weakly decreasing positive integers that add up to *n*. For instance, these are the five partitions of four: {4},{3,1},{2,2},{2,1,1},{1,1,1,1}.

The weight of a partition is the sum of its parts.

The length of a partition is its number of parts.

In a distinct partition, the parts are different. For example, the four distinct partitions of six are: {6},{5,1},{4,2},{3,2,1}.

A pentagonal number of the first kind is of the form 1/2*n*(3*n*-1) for *n*=0,1,2,…. The sequence starts 0,1,5,12,22,…. A pentagonal number of the second kind allows *n* to be negative, giving the sequence 2,7,15,26,…. The generalized pentagonal numbers are the union of the two kinds, 0, 1, 2, 5, 7, 12, 15, 22, 26, ….

The exceptional cases for Franklin's bijection are the partitions (written in compact form): ,,,,,,,,,….

Here is a distinct partition with an even number of parts:

In[1]:= |

The Franklin bijection maps a distinct partition of even length into one of odd length:

In[2]:= |

Out[2]= |

FranklinBijection is an involution, meaning applying it twice gives back the original partition:

In[3]:= |

Out[3]= |

For an exception, the Franklin bijection returns the partition unchanged:

In[4]:= |

Out[4]= |

Show the Ferrers diagram of an integer partition:

In[5]:= |

Out[2]= |

The way FranklinBijection works can be visualized with a Ferrers–Venn diagram, which overlaps two Ferrers diagrams as if they were a Venn diagram, like in this schematic:

In[6]:= |

Out[6]= |

Dots in the Ferrers diagram are moved from the diagonal line starting with the largest part to form a new smallest part or vice versa:

In[7]:= |

Out[7]= |

In[8]:= |

Out[8]= |

For weight 13, this shows the bijection between distinct partitions of even and of odd length:

In[9]:= |

Out[9]= |

Define functions for checking whether *n* is a pentagonal number of the first or the second kind:

In[10]:= |

In[11]:= |

If the weight *n* of a partition is not a generalized pentagonal number, it is not an exception:

In[12]:= |

If *n* is a generalized pentagonal number, these give the exceptional partition of weight *n*:

In[13]:= |

In[14]:= |

Here are the exceptional partitions up to *n*=26:

In[15]:= |

Out[15]= |

Their weights are the generalized pentagonal numbers:

In[16]:= |

Out[16]= |

For the exceptional partitions, it is not possible to get a distinct partition by moving dots as before:

In[17]:= |

Out[17]= |

The Franklin bijection leaves those partitions fixed:

In[18]:= |

Out[18]= |

The bijection gives a combinatorial proof of Euler's pentagonal number theorem: (1-x)(1-x^{2})(1-x^{3})…=1-x-x^{2}+x^{5}+x^{7}-x^{12}-x^{15}+…, where the powers of x in the sum are the generalized pentagonal numbers.

The Wolfram Language is able to evaluate both the infinite product and series:

In[19]:= |

Out[19]= |

In[20]:= |

Out[20]= |

Here are the first nine terms:

In[21]:= |

Out[21]= |

Define the distinct partitions of even and odd length:

In[22]:= |

In[23]:= |

The Franklin bijection matches the distinct partitions of even and odd lengths with one exception, when the weight is a generalized pentagonal number. Note that the powers match the exceptions found in the Applications example:

In[24]:= |

Out[24]= |

Wolfram Language 13.0 (December 2021) or above

- 1.1.0 – 12 April 2024
- 1.0.0 – 03 April 2024

This work is licensed under a Creative Commons Attribution 4.0 International License