# Friedman number

A Friedman number is an integer, which in a given base, is the result of an expression using all its own digits in combination with any of the four basic arithmetic operators (+, −, ×, ÷), additive inverses, parentheses, and exponentiation. For example, 347 is a Friedman number in base 10, since 347 = 73 + 4. The base 10 Friedman numbers are:

25, 121, 125, 126, 127, 128, 153, 216, 289, 343, 347, 625, 688, 736, 1022, 1024, 1206, 1255, 1260, 1285, 1296, 1395, 1435, 1503, 1530, 1792, 1827, 2048, 2187, 2349, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 2592, 2737, 2916, ... (sequence A036057 in the OEIS).

Friedman numbers are named after Erich Friedman, as of 2013 an Associate Professor of Mathematics and ex-chairman of the Mathematics and Computer Science Department at Stetson University, located in DeLand, Florida.

## Results in base 10

Parentheses can be used in the expressions, but only to override the default operator precedence, for example, in 1024 = (4 − 2)10. Allowing parentheses without operators would result in trivial Friedman numbers such as 24 = (24). Leading zeros cannot be used, since that would also result in trivial Friedman numbers, such as 01729 = 1720 + 9.

The expressions of the first few Friedman number are:

 number expression number expression number expression number expression 25 52 127 27−1 289 (8+9)2 688 8×86 121 112 128 28−1 343 (3+4)3 736 36+7 125 51+2 153 3×51 347 73+4 1022 210−2 126 6×21 216 62+1 625 56−2 1024 (4−2)10

A nice or orderly 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:

127, 343, 736, 1285, 2187, 2502, 2592, 2737, 3125, 3685, 3864, 3972, 4096, 6455, 11264, 11664, 12850, 13825, 14641, 15552, 15585, 15612, 15613, 15617, 15618, 15621, 15622, 15623, 15624, 15626, 15632, 15633, 15642, 15645, 15655, 15656, 15662, 15667, 15688, 16377, 16384, 16447, 16875, 17536, 18432, 19453, 19683, 19739 (sequence A080035 in the OEIS).

Friedman's website shows around 100 zeroless pandigital Friedman numbers as of August 2013. 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,[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 orderly Friedman numbers.[2] The case of base-10 orderly 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.

## Finding 2-digit Friedman numbers

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 mn and m/n.

## Other bases

### General results

In base ${\displaystyle b=mk-m}$,

${\displaystyle b^{2}+mb+k=(mk-m+m)b+k=mbk+k=k(mb+1)}$

is a Friedman number (written in base ${\displaystyle b}$ as 1mk = k×m1).[3]

In base ${\displaystyle b>2}$,

${\displaystyle {(b^{n}+1)}^{2}=b^{2n}+2{b^{n}}+1}$

is a Friedman number (written in base ${\displaystyle b}$ as 100...00200...001 = 100..0012, with ${\displaystyle n-1}$ zeroes between each nonzero number).[3]

In base ${\displaystyle b={\frac {k(k-1)}{2}}}$,

${\displaystyle 2b+k=2\left({\frac {k(k-1)}{2}}\right)+k=k^{2}-k+k=k^{2}}$

is a Friedman number (written in base ${\displaystyle b}$ 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 ${\displaystyle k=5}$, 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.[3]

Repdigit and Friedman numbers:

• The smallest repdigit in base 8 that is thought to be a Friedman number is 33 = 33.
• The smallest repdigit in base 10 that is thought to be a Friedman number is 99999999 = (9 + 9/9)9−9/9 − 9/9.[3]
• It has been proven that repdigits of the greatest digit in any base with more than 24 digits are nice Friedman numbers.

There are an infinite number of prime Friedman numbers in all bases, because for base ${\displaystyle 2\leq b\leq 6}$ the numbers

${\displaystyle n\times 10^{1111}+11111111=n\times 10^{1111}+10^{1000}-1+0+0}$ in base 2
${\displaystyle n\times 10^{102}+1101221=n\times 10^{102}+2^{101}+0+0}$ in base 3
${\displaystyle n\times 10^{20}+310233=n\times 10^{20}+33^{3}+0}$ in base 4
${\displaystyle n\times 10^{13}+2443111=n\times 10^{4+4}+(2\times 3)^{11}}$ in base 5
${\displaystyle n\times 10^{13}+25352411=n\times 10^{2\times 5-1}+(5+2)^{(3+4)}}$ in base 6

for base ${\displaystyle 7\leq b\leq 10}$ the numbers

${\displaystyle n\times 10^{60}+164351=n\times 10^{60}+(10+4-3)^{5}+0+0+\ldots }$ in base 7,
${\displaystyle n\times 10^{60}+163251=n\times 10^{60}+(10+3-2)^{5}+0+0+\ldots }$ in base 8,
${\displaystyle n\times 10^{60}+162151=n\times 10^{60}+(10+2-1)^{5}+0+0+\ldots }$ in base 9,
${\displaystyle n\times 10^{60}+161051=n\times 10^{60}+(10+1-0)^{5}+0+0+\ldots }$ in base 10,

and for base ${\displaystyle b>10}$

${\displaystyle n\times 10^{50}+{\text{15AA51}}=n\times 10^{50}+(10+{\text{A}}/{\text{A}})^{5}+0+0+\ldots }$

are Friedman numbers for all ${\displaystyle n}$. The numbers of this form are an arithmetic sequence ${\displaystyle pn+q}$, where ${\displaystyle p}$ and ${\displaystyle q}$ are relatively prime regardless of base as ${\displaystyle b}$ and ${\displaystyle b+1}$ are always relatively prime, and therefore, by Dirichlet's theorem on arithmetic progressions, the sequence contains an infinite number of primes.

### Duodecimal

In base 12, the Friedman numbers less than 1000 are:

 number expression 121 112 127 7×21 135 5×31 144 4×41 163 3×61 368 86−3 376 6×73 441 (4+1)4 445 54+4

## Using Roman numerals

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.

## References

1. ^ Michael Brand, "Friedman numbers have density 1", Discrete Applied Mathematics, 161(16–17), Nov. 2013, pp. 2389-2395.
2. ^ Michael Brand, "On the Density of Nice Friedmans", Oct 2013, https://arxiv.org/abs/1310.2390.
3. ^ a b c d https://www2.stetson.edu/~efriedma/mathmagic/0800.html