Friedman numbers
A Friedman number is a positive integer that can be written (nontrivially) using its own digits, together with parentheses and the operations of addition, subtraction, multiplication, division and exponentiation. An example of a Friedman number is 1395, because we can write 1395 as 15 × 93, and the digits on each side of the equation are the same, even if they do not appear in the same order.
If a Friedman number has the extra property that the digits in the formula are used in the same order in which they appear in the number, then the Friedman number is called nice. The first six nice Friedman numbers are shown above. For example, both sides of the equation 343 = (3+4)3 have digits that appear in the same order, and this means that the Friedman number 343 is “nice”.
Friedman numbers are named after Erich Friedman, who introduced them in August 2000. He has written a GitHub page about them at https://erich-friedman.github.io/mathmagic/0800.html. From the tables on that page, we see that there are only 72 Friedman numbers among the first 10,000 natural numbers, and that 14 of these 72 numbers are nice. However, there are plenty of larger Friedman numbers, and in fact, there are dozens of examples that use the digits 1 up to 9 once each, such as 123456789.
Perhaps surprisingly, there are also long strings of consecutive numbers that are all Friedman numbers. For example, as shown above, there is a string of 90 consecutive Friedman numbers beginning with 250010. Similarly, we could use the fact that 50002=25000000 to find a string of 900 consecutive Friedman numbers starting with 25000100. Because we can find arbitrarily long strings of consecutive Friedman numbers, it follows that there are infinitely many of them, just as there are infinitely many primes.
Even if there are infinitely many of something, it could still be the case that those things are in some sense rare. For example, if you pick a random natural number with at most 10 digits (i.e., less than 1010), the chances that the number will be prime are only around 4.55%. If you choose a random natural number with at most 20 digits (i.e., less than 1020), the chances of it being prime fall to around 2.22%, and the probability keeps going down the larger the numbers become. The prime number theorem says that if N is large, then the proportion of natural numbers less than N that are prime is about 1/log(N), where “log” is the natural logarithm. For example, plugging N=1020 into the formula gives an answer of around 0.0217, or 2.17%. In summary, it is unlikely that a very large number chosen at random will be prime.
In contrast, large Friedman numbers exist in abundance. In fact, it is almost certain that a very large number chosen at random will be a Friedman number! This surprising result was proved in the 2013 paper Friedman numbers have density 1 by Michael Brand. Brand also proved that the nice Friedman numbers have density 1, provided that one works in base 2, 3, or 4.
Friedman’s web page discusses many variations on the theme of Friedman numbers, including using Roman numerals (for example, XCIV = C – V – IX) or even using the Mayan system of numerals.
Picture credits and relevant links
The prime number theorem is a famous result in number theory that was first proved in 1896.
The On-Line Encyclopedia of Integer Sequences has more information on Friedman numbers.
The screenshot from the OEIS is sequence A006880, which gives the number of prime numbers less than 10n for various values of n. The other graphics are my own work.
Substack management by Buzz & Hum.