# Applications of Perfect Numbers

I’m preparing a talk on Mersenne primes, Perfect numbers and Fermat primes.

In trying to provide motivation for it all I’d like to provide an application of these things.

I came up with these:

Applications of Mersenne numbers: signed/unsigned integers, towers of Hanoi

Applications of Fermat numbers: relation to constructible polygons

But for perfect numbers the best I could find is: The earth was created in 6 days by God because 6 is perfect. Also, the cycle of the moon is 28 days.

For 6: $\log(1+2+3)=\log(1)+\log(2)+\log(3)$
This page (http://www-history.mcs.st-andrews.ac.uk/HistTopics/Perfect_numbers.html) has a lot of history but no real applications.

Can anyone give application of perfect numbers?

#### Solutions Collecting From Web of "Applications of Perfect Numbers"

The Mersenne Twister [1] is a good pseudorandom number generator based on a Mersenne prime. Apparently other systems exist using Mersenne primes for pseudorandom number generation as well. [2]

In communication complexity, Mersenne primes enabled a major advance in private information retrieval schemes [3][4], with an asymptotic result dependent on their infinitude.

The number-theoretic transform, an alternative approach to fast Fourier transforms using modular arithmetic rather than floating-point numbers, is most efficient when using GF(p) where p is a Mersenne prime. [5]

The EFF is offering prizes for discovering large primes, and Mersenne primes have won the first two. They are also the likeliest candidate for the remaining two awards since they’re easier to prove prime than other numbers of similar size.

The GIMPS software is often used to stress-test new computer configurations. In this capacity it uncovered a bug in the Skylake family of Intel processors. [6]

GPUs are similarly tested with Mersenne-prime methods. [7]

Solinas [8][9] showed how to use numbers near Mersenne primes to perform high-speed modular reductions, suitable for a fast cryptosystem. Granger & Moss [9] show an alternate generalization that enhances these benefits, especially for modular multiplication.

Harvey, van der Hoeven, & Lecerf [11] give a multiplication algorithm (an extension of Fürer’s algorithm) which is the fastest known, and show that it can be further improved given “a slight weakening of the Lenstra-Pomerance-Wagstaff conjecture” on Mersenne prime distribution. Probably the algorithm is not practical for the sizes of numbers typically used but advances in multiplication are very important as they underlie many modern algorithms.

[1] M. Matsumoto and T. Nishimura, Mersenne Twister: A 623-dimensionally equidistributed uniform pseudorandom number generator, ACM Trans. on Modeling and Computer Simulation 8:1 (1998), pp. 3-30.

[2] Lih-Yuan Deng, Generalized Mersenne Prime Number and Its Application to Random Number Generation, Monte Carlo and Quasi-Monte Carlo Methods (2004), pp. 167-180.

[3] Sergey Yekhanin, New Locally Decodable Codes and Private Information Retrieval Schemes, Electronic Colloquium on Computational Complexity, Report No. 127 (2006)

[4] Kiran S. Kedlaya and Sergey Yekhanin, Locally Decodable Codes From Nice Subsets of Finite Fields and Prime Factors of Mersenne Numbers (2007)

[5] I. S. Reed and T. K. Truong, Fast algorithms for computing Mersenne-prime number-theoretic transforms, DSN Progress Report 42-41 (1977).

[6] TechTimes, Mathematicians Discover Bug That Causes Skylake Chips To Freeze In The Middle Of Complex Workloads (2016)

[7] Andrew Thall, Fast Mersenne Prime Testing on the GPU (2011)

[8] Jerome A. Solinas, Generalized Mersenne Primes (1999).

[9] Jerome A. Solinas, Pseudo-Mersenne Prime, Encyclopedia of Cryptography and Security, 2nd Ed. (2011), p. 992.

[10] Robert Granger and Andrew Moss, Generalised Mersenne numbers revisited (2011)

[11] David Harvey, Joris van der Hoeven, Grégoire Lecerf, Even faster integer multiplication (2014)

Here is a paraphrase of a story I once read (I don’t remember the source). In an ancient society, if a person wanted to bequeath a number $n$ of items, s/he would always bequeath in aliquot parts (proper divisors of $n$), but no two heirs would receive the same aliquot parts. So for instance if a man had 10 camels, he could bequeath 1, 2, or 5 camels to three heirs. (I don’t know what happened to the remaining camels since one isn’t allowed to give the same aliquot part to two different people). Another person had 12 gold bars. Thus she could bequeath 1, 2, 3, 4, or 6 gold bars to her heirs. However this means if she had five heirs, she wouldn’t have enough gold bars to distribute all the aliquot parts. Finally another person had 6 palaces. So this person could bequeath 1, 2, or 3 palaces. This works out perfectly for three heirs–the total of the aliquot parts exactly matches the amount to give away.

So the application of perfect numbers is that all the aliquot parts can be given away and exactly use up the perfect number of things being given away.

Sorry…best I could do.