A Friedman number is an integer, which represented in a given numeral system, is the result of a non-trivial expression using all its own digits in combination with any of the four basic arithmetic operators (+, −, ×, ÷), additive inverses, parentheses, exponentiation, and concatenation. Here, non-trivial means that at least one operation besides concatenation is used. Leading zeros cannot be used, since that would also result in trivial Friedman numbers, such as 024 = 20 + 4. For example, 347 is a Friedman number in the decimal numeral system, since 347 = 73 + 4. The decimal Friedman numbers are:
Friedman numbers are named after Erich Friedman, a now-retired mathematics professor at Stetson University, located in DeLand, Florida.
A Friedman prime is a Friedman number that is also prime. The decimal Friedman primes are:
The expressions of the first few Friedman numbers are:
A nice Friedman number is a Friedman number where the digits in the expression can be arranged to be in the same order as in the number itself. For example, we can arrange 127 = 27 − 1 as 127 = −1 + 27. The first nice Friedman numbers are:
A nice Friedman prime is a nice Friedman number that's also prime. The first nice Friedman primes are:
Friedman's website shows around 100 zeroless pandigital Friedman numbers as of April 2020[update]. Two of them are: 123456789 = ((86 + 2 × 7)5 − 91) / 34, and 987654321 = (8 × (97 + 6/2)5 + 1) / 34. Only one of them is nice: 268435179 = −268 + 4(3×5 − 17) − 9.
Michael Brand proved that the density of Friedman numbers among the naturals is 1, which is to say that the probability of a number chosen randomly and uniformly between 1 and n to be a Friedman number tends to 1 as n tends to infinity. This result extends to Friedman numbers under any base of representation. He also proved that the same is true also for binary, ternary and quaternary nice Friedman numbers. The case of base-10 nice Friedman numbers is still open.
Vampire numbers are a subset of Friedman numbers where the only operation is a multiplication of two numbers with the same number of digits, for example 1260 = 21 × 60.
There usually are fewer 2-digit Friedman numbers than 3-digit and more in any given base, but the 2-digit ones are easier to find. If we represent a 2-digit number as mb + n, where b is the base and m, n are integers from 0 to b−1, we need only check each possible combination of m and n against the equalities mb + n = mn, and mb + n = nm to see which ones are true. We need not concern ourselves with m + n or m × n, since these will always be smaller than mb + n when n < b. The same clearly holds for m − n and m / n.
In base ,
is a Friedman number (written in base as 1mk = k × m1).
In base ,
is a Friedman number (written in base as 100...00200...001 = 100..0012, with zeroes between each nonzero number).
In base ,
is a Friedman number (written in base as 2k = k2). From the observation that all numbers of the form 2k × b2n can be written as k000...0002 with n 0's, we can find sequences of consecutive Friedman numbers which are arbitrarily long. For example, for , or in base 10, 250068 = 5002 + 68, from which we can easily deduce the range of consecutive Friedman numbers from 250000 to 250099 in base 10.
Repdigit Friedman numbers:
There are an infinite number of prime Friedman numbers in all bases, because for base the numbers
for base the numbers
and for base
are Friedman numbers for all . The numbers of this form are an arithmetic sequence , where and are relatively prime regardless of base as and are always relatively prime, and therefore, by Dirichlet's theorem on arithmetic progressions, the sequence contains an infinite number of primes.
In base 12, the Friedman numbers less than 1000 are:
In a trivial sense, all Roman numerals with more than one symbol are Friedman numbers. The expression is created by simply inserting + signs into the numeral, and occasionally the − sign with slight rearrangement of the order of the symbols.
Some research into Roman numeral Friedman numbers for which the expression uses some of the other operators has been done. The first such nice Roman numeral Friedman number discovered was 8, since VIII = (V - I) × II. Other such nontrivial examples have been found.
The difficulty of finding nontrivial Friedman numbers in Roman numerals increases not with the size of the number (as is the case with positional notation numbering systems) but with the numbers of symbols it has. For example, it is much tougher to figure out whether 147 (CXLVII) is a Friedman number in Roman numerals than it is to make the same determination for 1001 (MI). With Roman numerals, one can at least derive quite a few Friedman expressions from any new expression one discovers. Since 8 is a nice nontrivial nice Roman numeral Friedman number, it follows that any number ending in VIII is also such a Friedman number.