CINXE.COM

Math Magic

<!doctype html public "&ndash;//IETF//DTD HTML//EN"><HTML> <HEAD><TITLE>Math Magic</TITLE></HEAD> <BODY background="formulas.gif"> <CENTER><H1> Problem of the Month (August 2000)</H1></CENTER><font size=+1> A <b>Friedman number</b> is a positive integer which can be written in some non-trivial way using its own digits, together with the symbols + &ndash; &times; / ^ ( ) and concatenation. For example, 25 = 5<sup>2</sup> and 126 = 21 &times; 6. The Friedman numbers are sequence <A HREF="https://oeis.org/search?q=A036057">A036057</A> of the <A HREF="https://oeis.org/ ">Encyclopedia of Integer Sequences</A>.<p> All Friedman numbers with 4 or fewer digits are known: <center><pre> 25, 121, 125, 126, 127, 128, 153, 216, 289, 343, 347, 625, 688, 736, 1022, 1024,<br>1206, 1255, 1260, 1285, 1296, 1395, 1435, 1503, 1530, 1792, 1827, 2048, 2187, 2349,<br>2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 2592 ,2737, 2916, 3125,<br>3159, 3281, 3375, 3378, 3685, 3784, 3864, 3972, 4088, 4096, 4106, 4167, 4536, 4624,<br>4628, 5120, 5776, 5832, 6144, 6145, 6455, 6880, 7928, 8092, 8192, 9025, 9216, 9261.</pre></center> Determine why each of these is a Friedman number. You might also have fun confirming that 123456789 and 987654321 are Friedman numbers. Find some more Friedman numbers. What else can you show about Friedman numbers? If <b>F(n)</b> is the number of Friedman numbers less than n, can you show F(n)/n &rarr; 1? or even disprove F(n)/n &rarr; 0? <P><hr><p><center><h1>ANSWERS</h1></center> Mike Reid thought that Friedman numbers are "nicer" if the digits are used in the proper order. These are shown in red below.<p> Mike Reid, Ulrich Schimke, and Philippe Fondanaiche solved all the Friedman numbers with 4 or fewer digits. Here are the solutions:<p> <center><font size=+2>Friedman Numbers With 4 or Fewer Digits</font></center> <center><table cellpadding=5 border=2 bordercolor=black bgcolor=#FFFFFF> <tr> <td>25 = 5<sup>2</sup> <td>121 = 11<sup>2</sup> <td>125 = 5<sup>1+2</sup> <td>126 = 6 &times; 21 <td><font color=red>127 = &ndash; 1 + 2<sup>7</sup> <td>128 = 2<sup>8&ndash;1</sup> </tr> <tr> <td>153 = 3 &times; 51 <td>216 = 6<sup>2+1</sup> <td>289 = (8 + 9)<sup>2</sup> <td><font color=red>343 = (3 + 4)<sup>3</sup> <td>347 = 7<sup>3</sup> + 4 <td>625 = 5<sup>6&ndash;2</sup> </tr> <tr> <td>688 = 8 &times; 86 <td><font color=red>736 = 7 + 3<sup>6</sup> <td>1022 = 2<sup>10</sup> &ndash; 2 <td>1024 = (4 &ndash; 2)<sup>10</sup> <td>1206 = 6 &times; 201 <td>1255 = 5 &times; 251 </tr> <tr> <td>1260 = 6 &times; 210 <td><font color=red>1285 = (1 + 2<sup>8</sup>) &times; 5 <td>1296 = 6<sup>(9&ndash;1)/2</sup> <td>1395 = 15 &times; 93 <td>1435 = 35 &times; 41 <td>1503 = 3 &times; 501 </tr> <tr> <td>1530 = 3 &times; 510 <td>1792 = 7 &times; 2<sup>9&ndash;1</sup> <td>1827 = 21 &times; 87 <td>2048 = 8<sup>4</sup> / 2 + 0 <td><font color=red>2187 = (2 + 1<sup>8</sup>)<sup>7</sup> <td>2349 = 29 &times; 3<sup>4</sup> </tr> <tr> <td>2500 = 50<sup>2</sup> + 0 <td>2501 = 50<sup>2</sup> + 1 <td><font color=red>2502 = 2 + 50<sup>2</sup> <td>2503 = 50<sup>2</sup> + 3 <td>2504 = 50<sup>2</sup> + 4 <td>2505 = 50<sup>2</sup> + 5 </tr> <tr> <td>2506 = 50<sup>2</sup> + 6 <td>2507 = 50<sup>2</sup> + 7 <td>2508 = 50<sup>2</sup> + 8 <td>2509 = 50<sup>2</sup> + 9 <td><font color=red>2592 = 2<sup>5</sup> &times; 9<sup>2</sup> <td><font color=red>2737 = (2 &times; 7)<sup>3</sup> &ndash; 7 </tr> <tr> <td>2916 = (1 &times; 6 &times; 9)<sup>2</sup> <td><font color=red>3125 = (3 + 1 &times; 2)<sup>5</sup> <td>3159 = 9 &times; 351 <td>3281 = (3<sup>8</sup> + 1) / 2 <td>3375 = (3 + 5 + 7)<sup>3</sup> <td>3378 = (7 + 8)<sup>3</sup> + 3 </tr> <tr> <td><font color=red>3685 = (3<sup>6</sup> + 8) &times; 5 <td>3784 = 8 &times; 473 <td><font color=red>3864 = 3 &times; (&ndash; 8 + 6<sup>4</sup>) <td><font color=red>3972 = 3 + (9 &times; 7)<sup>2</sup> <td>4088 = 8<sup>4</sup> &ndash; 8 &ndash; 0 <td><font color=red>4096 = (4 + 0 &times; 9)<sup>6</sup> </tr> <tr> <td>4106 = 4<sup>6</sup> + 10 <td>4167 = 4<sup>6</sup> + 71 <td>4536 = 56 &times; 3<sup>4</sup> <td>4624 = (64 + 4)<sup>2</sup> <td>4628 = 68<sup>2</sup> + 4 <td>5120 = 5 &times; 2<sup>10</sup> </tr> <tr> <td>5776 = 76<sup>7&ndash;5</sup> <td>5832 = (2 &times; 5 + 8)<sup>3</sup> <td>6144 = 6 &times; 4<sup>4+1</sup> <td>6145 = 6 &times; 4<sup>5</sup> + 1 <td><font color=red>6455 = (6<sup>4</sup> &ndash; 5) &times; 5 <td>6880 = 8 &times; 860 </tr> <tr> <td>7928 = 89<sup>2</sup> + 7 <td>8092 = 90<sup>2</sup> &ndash; 8 <td>8192 = 8 &times; 2<sup>9+1</sup> <td>9025 = 95<sup>2</sup> + 0 <td>9216 = 1 &times; 96<sup>2</sup> <td>9261 = 21<sup>9&ndash;6</sup> </tr> </table></center><p> In 2002, I wrote a program capable of finding all the 5-digit Friedman numbers. In 2013, Giovanni Resta found an omission. In 2019, Elke Kuge found some typos. They are <a href="0800/5digit.html">here</a>.<p> The 6-digit nice Friedman numbers are <a href="0800/6digitnice.html">here</a>. Michael Yee found some typos and an omission.<p> In 2013, all the 6-digit Friedman numbers were computed by Giovanni Resta. They can be found <a href="0800/6digit.txt">here</a>.<p> In 2023, all the 7-digit Friedman numbers were computed by Michael Yee. They can be found <a href="0800/7digit.txt">here</a>. And <a href="0800/7digitnice.txt">here</a> are the nice ones.<p> Here are the number of Friedman numbers known with n digits:<p> <table align=center border=1 cellpadding=5> <tr align=center><th>Number of<br>Digits<th>Number of<br>Friedman Numbers<th>Number of Nice<br>Friedman Numbers <tr align=center><td>1<td>0<td>0 <tr align=center><td>2<td>1<td>0 <tr align=center><td>3<td>13<td>3 <tr align=center><td>4<td>58<td>11 <tr align=center><td>5<td>772<td>93 <tr align=center><td>6<td>8968<td>530 <tr align=center><td>7<td>114445<td>3591 </table><p> Here is a graph of the size of the Friedman numbers with 6 or fewer digits:<p> <center><img src="0800/fn.gif"></center><p> And here is a graph of the size of the nice Friedman numbers with 6 or fewer digits:<p> <center><img src="0800/nfn.gif"></center><p> Mike Reid, Philippe Fondanaiche, and I found that 123456789 = ((86 + 2 &times; 7)<sup>5</sup> &ndash; 91) / 3<sup>4</sup> and 987654321 = (8 &times; (97 + 6/2)<sup>5</sup> + 1) / 3<sup>4</sup> are Friedman numbers. In 2007, Chris Wardle found another pandigital Friedman number. Bruno Curfs found another in 2008, and several more in 2013 and 2015. The known 9- and 10-digit pandigital Friedman numbers can be found <a href="0800/pandigital.html">here</a>. There are even some nice pandigital Friedman numbers known, all of which but one were found by Igor Krasikov, and they can be found <a href="0800/nicepandigitalFN.txt">here</a><p> A <a href="http://hjem.get2net.dk/jka/math/vampires/">vampire number</a> is a number that can be written as the product of numbers that together contain the same digits as the number itself. This sequence, a subsequence of the Friedman numbers, begins 126, 153, 688, 1206, 1255, 1260, 1395, 1435, 1503, 1530, 1827, 2187, 3159, 3784, 6880, . . . , and is sequence <A HREF="http://www.research.att.com/~njas/sequences/A020342" >A020342</A> of the <A HREF="http://www.research.att.com/~njas/sequences/index.html">Encyclopedia of Integer Sequences</A>. Philippe Fondanaiche sent me lots of vampire numbers, but noticed that vampire numbers get more and more rare, so that the vast majority of Friedman numbers use the exponential operator.<p> Bruno Curfs sent these files of pandigital vampire numbers. Some have <a href="0800/vamp9.txt">9 digits</a> and others have <a href="0800/vamp10.txt">10 digits</a>.<p> Several contributors were interested in repdigit Friedman numbers. The best known results on these are <a href="0800/repdigits.html">here</a>. The sequence of Friedman numbers which contain exactly 2 different digits starts 25, 121, 343, 688, 29929, 46644, 46646, 46664, 55225, 117777, 244224, 699696, 699966, .... What are the next terms?<p> Robert Reid notes that 7776 would be a Friedman number if we allowed decimal points: 7776 = 6<sup>7/(.7+.7)</sup>. Jacon Minninga showed the same about 4875 = 7.8 &times; 5<sup>4</sup>.<p> The following people disproved that F(n)/n &rarr; 0. Brendan Owen used N,12588304 = N &times; 10<sup>8</sup> + 3548<sup>2</sup>. Mike Reid used N,46656 = N &times; (4+6)<sup>5</sup> + 6<sup>6</sup>. Note that these examples also show that there are Friedman numbers beginning with any string of digits.<p> Michael Brand sent me an amazing <a href="0800/proof.pdf">proof</a> in March of 2010 that F(n)/n &rarr; 1. It was published in 2013: Michael Brand, "Friedman numbers have density 1", Discrete Applied Mathematics, 161 (16-17), pp. 2389-2395, 2013.<p> Ulrich Schimke conjectures that for every k which is not a power of 10, k<sup>n</sup> is a Friedman number for arbitrarily large n. He notes that 2<sup>n</sup> appears to be a Friedman number for all n&gt;9. Trevor Green points out that all powers of 5 seem to be Friedman numbers.<p> A <a href="http://tywkiwdbi.blogspot.com/2011/08/pretty-wild-narcissistic-numbers.html">pretty wild narcissistic number</a> uses the digits in order, but also allows the square root and factorial operators. So nice Friedman numbers are a subset of these numbers.<p> Philippe Fondanaiche noticed that most Friedman numbers are composite. The first few known prime Friedman numbers are 127, 347, 2503, 12101, 12107, 12109, 15629, 15641, 15661, 15667, 15679, 16381, 16447, 16759, 19739, . . . .<p> Ron Kaminsky proved that there are infinitely many prime Friedman numbers. The numbers k&times;10<sup>14</sup>+19683 = k&times;10<sup>6+8</sup>+3<sup>9</sup>+0+0+ . . . are Friedman numbers for all k. The numbers of this form are an arithmetic sequence a n+b where a and b are relatively prime, and therefore, by a well-known theorem of Dirichlet, the sequence contains an infinite number of primes. In 2020, Madeline Birchfield generalized this result to arbitrary bases.<p> Here are some other results of mine on Friedman numbers. There are arbitrarily long strings of consecutive Friedman numbers, because of the numbers from 25&times;10<sup>2n</sup> to 25&times;10<sup>2n</sup> + 10<sup>n</sup> &ndash; 1 are 10<sup>n</sup> consecutive Friedman numbers. For example, 250068 = 500<sup>2</sup>+68. This also shows that there are Friedman numbers ending with any string of digits.<p> Since the density of Friedman numbers approaches 1, this means the density of numbers that are the sum of 2 Friedman numbers also approaches 1. Are all arbitrarily large numbers the sum of 2 Friedman numbers? The largest number known NOT to be the sum of 2 Friedman numbers is 134632. I suspect that is the last one. Since the first 2 Friedman numbers 25 and 121 are coprime, it is easy to prove that the largest number that is not the sum of any number of Friedman numbers is 486.<p> It is also easy to show that if n&gt;60, there is a Friedman number between n and 2n. Zeroes can be added to the right of any of the Friedman numbers 688 = 8 &times; 86, 1206 = 6 &times; 201, 1827 = 21 &times; 87, 3159 = 9 &times; 351, and 3784 = 8 &times; 473. The list at the top of the page handles the small cases.<p> The known Friedman numbers in other small bases can be found <a href="0800/base.html">here</a>.<p> Trevor Green proved that there are infinitely many Friedman numbers in every base by considering numbers of the form 1000...02000...01=1000...01<sup>2</sup>+0+0+...+0 in bases larger than 2 and numbers of the form 1000...01000...0001=10001<sup>10</sup>+0+0+...+0 in base 2.<p> Trevor Green also writes: "25 is a Friedman number in bases 2, 3 and 4 as well as base 10. What other numbers are Friedman numbers in more than one base, or in an unusually large number of bases? What numbers are not Friedman numbers in any base?"<p> Trevor Green has found several other strings which are Friedman numbers in all large bases, such as 102030201 = (10301 &ndash; 200)<sup>2</sup> and 1367631 = (117 &ndash; 6)<sup>(6+3)/3</sup>. Also, he found the series 121 = 11<sup>2</sup>, 12321 = (113 &ndash; 2)<sup>2</sup>, 1234321 = (1143 &ndash; 32)<sup>2</sup>, 123454321 = (11543 &ndash; 432)<sup>2</sup>, . . . .<p> Trevor Green noticed that when a>1 and b>2, 1ab is a Friedman number in base a(b&ndash;1), since it can be written 1ab = b&times;a1. He also noted that when a>1 and b>1, if we let c=a&times;b and d=a<sup>2</sup>&times;b, then acd is a Friedman number in base b&times;(d&ndash;1), since it can be written acd = c&times;da.<p> In 2007, Trevor Green sent me a list of the 3-digit Friedman numbers in all bases up to 100 that are not part of a known family. They can be found <a href="0800/3digit.txt">here</a>. A month later he sent me some of the <a href="0800/patterns.txt">patterns</a> from the list.<p> Robert Happelberg invented the concept of Roman Friedman Numbers. Here are the ones we found less than 100:<p> <center><table border=5 bordercolor=brown cellpadding=3> <tr><td colspan="4" align=center><font size=+2>Roman Friedman Numbers</font></tr><tr> <td><font color=red>VIII = (V &ndash; I) &times; II <font color=purple>(AR) <td><font color=red>XVIII = X + (V &ndash; I) &times; II <font color=purple>(AR) <td>XXVII = IX &times; (X/V + I) <font color=pink>(BH) <td><font color=red>XXVIII = XX + (V &ndash; I) &times; II <font color=purple>(AR) </tr><tr> <td>XXXIII = XI &times; (X/X + II) <td>XXXVI = VI<sup>XX/X</sup> <td>XXXVII = IX &times; (X/V + I) + X <font color=pink>(BH) <td><font color=red>XXXVIII = XXX + (V &ndash; I) &times; II <font color=purple>(AR) </tr><tr> <td>XLIV = L &ndash; V &ndash; I<sup>X</sup> <td>XLVI = L &ndash; V + I<sup>X</sup> <td>XLVII = L &ndash; X/V &ndash; I &times; I <font color=pink>(BH) <td><font color=red>XLVIII = XL + (V &ndash; I) &times; II <font color=purple>(AR) </tr><tr> <td>XLIX = L &ndash; I<sup>XX</sup> <td><font color=red>LVIII = L + (V &ndash; I) &times; II <font color=purple>(AR) <td><font color=red>LXVIII = LX + (V &ndash; I) &times; II <font color=purple>(AR) <td>LXXIV = L &times; XV / X &ndash; I <font color=pink>(BH) </tr><tr> <td><font color=red>LXXV = L / X &times; XV</font> <font color=pink>(BH) <td><font color=red>LXXVI = L / X &times; XV + I <font color=pink>(BH) <td><font color=red>LXXVII = L / X &times; XV + II <font color=pink>(BH) <td><font color=red>LXXVIII = L / X &times; XV + III <font color=pink>(BH) </tr><tr> <td>LXXXI = IX<sup>X&times;X/L</sup> <td>LXXXII = IX<sup>X&times;X/L</sup> + I <td>LXXXIII = IX<sup>X&times;X/L</sup> + II <td><font color=red>LXXXIV = LX / X &times; XIV</font> <font color=gold>(AF) </tr><tr> <td>LXXXVI = L &times; XV / X + XI <td>LXXXVII = L &times; XV / X + XII <td><font color=red>LXXXVIII = LXXX + (V &ndash; I) &times; II <font color=purple>(AR) <td>LXXXIX = X &times; (X &ndash; I<sup>L</sup>) &ndash; X/X </tr><tr> <td>XCIV = C &ndash; V &ndash; I<SUP>X</SUP> <td>XCVI = C &ndash; V + I<SUP>X</SUP> <td>XCVII = C &ndash; X/V + I&times;I <td><font color=red>XCVIII = XC + (V &ndash; I) &times; II <font color=purple>(AR) </tr><tr> <td>XCIX = C &ndash; I<SUP>XX</SUP></tr> </table></center><p> In 2013, Alan Frank found the first non-trivial nice Roman Friedman number. Then Bryce Herdt found several more. Then Alex Rower pointed out that any number ending in 8 is a nice Roman Friedman number.<p> In 2016, I generalized the notion of Friedman numbers to Mayan Friedman numbers. <a href="https://en.wikipedia.org/wiki/Maya_numerals">Mayan numerals</a> use dots for 1's, horizontal lines for 5's, and a base-20 positional system. Thus <img src="0800/13.jpg" width=33> stands for 13, and <img src="0800/133.jpg" width=33> stands for 6&times;20+13=133.<p> The majority of numbers are Mayan Friedman numbers, because if n is one of them, then we can add dots and lines to the last "digit" of n and the result will still be a Mayan Friedman number. For example, 8 is a Mayan Friedman number because <img src="0800/8.jpg" width=33> = ( <img src="0800/5.jpg" width=33> &ndash; <img src="0800/1.jpg" width=15> ) &times; <img src="0800/2.jpg" width=20>, and therefore 13 is also a Mayan Friedman number because <img src="0800/13.jpg" width=33> = ( <img src="0800/5.jpg" width=33> &ndash; <img src="0800/1.jpg" width=15> ) &times; <img src="0800/2.jpg" width=20> + <img src="0800/5.jpg" width=33> .<p> If n is a Mayan Friedman number, and n&ndash;1 and n&ndash;5 are either not Mayan Friedman numbers, or don't have the same quotient modulo 20, we say n is a <b>primitive Mayan Friedman number</b>. Then we can add 1's and 5's to the last "digit" to get all Mayan Friedman numbers from these. Alex Rower points out that all Friedman numbers in base 20 are also Mayan Friedman numbers. Here is a list of the possible primitive Mayan Friedman numbers less than 300:<p> <center><table border=5 bordercolor=green cellpadding=5> <tr><td colspan="8" align=center><font size=+2>Primitive Mayan Friedman Numbers</font></tr><tr> <td>4 = 2 &times; 2 <td>8 = (5 &ndash; 1) &times; 2 <td>29 = 2<sup>5</sup> &ndash; 3 <td>30 = 6 &times; 5 <td>42 = 21 &times; 2 </tr><tr> <td>50 = 5 &times; 5 &times; 2 <td>63 = 21 &times; 3 &times; 1 <td>72 = 6 &times; 6 &times; 2 &times; 1 <td>75 = 5 &times; 5 &times; (5 &ndash; 2) &times; 1 <td>82 = 41 &times; 2 &times; 1 </tr><tr> <td>90 = 6 &times; 5 &times; 3 <td>114 = 5 &times; 1 &times; (5 &times; 5 &ndash; 2) &ndash; 1 <td>118 = 5 &times; 5 &times; 5 &ndash; 1 &times; 5 &ndash; 2 <td>124 = 5<sup>3</sup> &ndash; 1 &times; 1 <td>128 = 2<sup>5</sup> &times; (5 &ndash; 1 &times; 1) </tr><tr> <td>130 = 5 &times; (5 &times; 5 + 1) <td>144 = (6 &times; 2 &times; 1)<sup>2</sup> <td>147 = 21 &times; (6 + 1<sup>5</sup>) <td>150 = 6 &times; 5 &times; 5 &times; 1 <td>164 = 2 &times; (3<sup>5&ndash;1</sup> + 1) </tr><tr> <td>165 = 5 &times; (2<sup>5</sup> + 1) <td>183 = 61 &times; (5 &ndash; 2) &times; 1 <td>185 = 5 &times; (6<sup>2</sup> + 1) <td>209 = 7 &times; 6 &times; 5 &ndash; 1 <td>213 = 5 &times; 5 &times; 5 &ndash; 5 + 3 </tr><tr> <td>224 = (2 &times; 5 + 5)<sup>2</sup> &ndash; 1 <td>228 = 6 &times; (2<sup>5</sup> + 6) <td>231 = (5 &ndash; 1)<sup>5&ndash;1</sup> &ndash; 5 &times; 5 <td>235 = 10 &times; (5 &times; 5 &ndash; 1) &ndash; 5 <td>242 = (5 &ndash; 2)<sup>5</sup> &ndash; 1 &times; 1 </tr><tr> <td>246 = 41 &times; (5 / 5 + 5) <td>250 = 5 &times; 5 &times; 5 &times; 2 <td>264 = 6 &times; (5 &times; 3<sup>2</sup> &ndash; 1) <td>266 = (5 &ndash; 1)<sup>5&ndash;1</sup> + 2 &times; 5 <td>270 = 5 &times; (5 &times; 5 &times; 2 + 5 &ndash; 1) </tr><tr> <td>283 = (2<sup>5&ndash;1</sup> + 1)<sup>2</sup> &ndash; 6 <td>285 = 5 &times; (5<sup>2</sup> + 2<sup>5</sup>) </table></center><p> <HR><p>If you can extend any of these results, please <a href="mailto:erichfriedman68@gmail.com">e-mail</a> me. Click <a href="https://erich-friedman.github.io/mathmagic/">here</a> to go back to Math Magic. <font size=-1>Last updated 1/30/20.<font> </BODY> </HTML>

Pages: 1 2 3 4 5 6 7 8 9 10