Smallest Number with Five 9's

Logic Level 5

Find the smallest positive integer which requires at least five 9's to be written in an expression which is equal to said number.

Allowed operations:

  • + , , × , ÷ , +, -, \times, \div, \sqrt{ \cdot }
  • Brackets
  • Factorial
  • Power / Exponentiation
  • Concatenation of 9's in the expression

Disallowed operators. Everything else, including but not limited to:

  • Decimal points (since you need a concatenate a 0)
  • Other mathematical operators like cube roots

An example of how to use these operators is using 4's to create 28 would be 28 = 4 × ( 4 + 4 + ( 4 ÷ 4 ) ) 28=4 \times (4+\sqrt{4}+(4 \div 4)) , which uses five 4's, but you can also do this with two 4's as follows: 28 = 4 ! + 4 28=4!+4 , and this is the shortest method. Therefore, 28 can be written using at least two 4's.


The answer is 94.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Sharky Kesa
Apr 6, 2017

Once again, I have no better method of solving this apart from going through all the numbers:

1 = 9 9 2 = ( 9 ) ! 9 3 = 9 4 = 9 + 9 9 5 = 9 + ( 9 ) ! 9 6 = ( 9 ) ! 7 = 9 ( 9 ) ! 9 8 = 9 9 9 9 = 9 10 = 9 + 9 9 11 = 99 9 12 = 9 + 9 13 = 9 + 9 + 9 9 14 = 9 + 9 + ( 9 ) ! 9 15 = 9 + ( 9 ) ! 16 = 9 + 9 ( 9 ) ! 9 17 = 9 + 9 9 9 18 = 9 + 9 19 = 9 + 9 + 9 9 20 = ( ( 9 ) ! ) ! ( 9 ) ! ( 9 ) ! 21 = 9 + 9 + 9 22 = ( ( ( 9 ) ! ) ! + ( 9 ) ! ) × ( 9 ) ! 9 23 = ( ( 9 ) ! ) ! ( 9 ) ! ( 9 ) ! + 9 24 = 9 × 9 9 25 = 9 × 9 ( 9 ) ! 9 26 = 9 × 9 9 9 27 = 9 × 9 28 = 9 × 9 + 9 9 29 = 9 × 9 + ( 9 ) ! 9 30 = 9 × 9 + 9 31 = 99 ( 9 ) ! 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 17&=9+9-\dfrac{9}{9}\\ 18&=9+9\\ 19&=9+9+\dfrac{9}{9}\\ 20&=\dfrac{\frac{((\sqrt{9})!)!}{(\sqrt{9})!}}{(\sqrt{9})!}\\ 21&=9+9+\sqrt{9}\\ 22&=\sqrt{\dfrac{(((\sqrt{9})!)!+(\sqrt{9})!)\times (\sqrt{9})!}{9}}\\ 23&=\dfrac{\frac{((\sqrt{9})!)!}{(\sqrt{9})!}}{(\sqrt{9})!}+\sqrt{9}\\ 24&=9\times \sqrt{9}-\sqrt{9}\\ 25&=9\times \sqrt{9}-\dfrac{(\sqrt{9})!}{\sqrt{9}}\\ 26&=9\times \sqrt{9}-\dfrac{9}{9}\\ 27&=9\times \sqrt{9}\\ 28&=9\times \sqrt{9}+\dfrac{9}{9}\\ 29&=9\times \sqrt{9}+\dfrac{(\sqrt{9})!}{\sqrt{9}}\\ 30&=9\times \sqrt{9}+\sqrt{9}\\ 31&=\dfrac{99-(\sqrt{9})!}{\sqrt{9}}\\ 32&=\sqrt{\sqrt{\sqrt{\sqrt{\dfrac{(\sqrt{9})!}{\sqrt{9}}}}}}^{\dfrac{((\sqrt{9})!)!}{9}}\\ 33&=\dfrac{99}{\sqrt{9}}\\ 34&=(\sqrt{9})!\times (\sqrt{9})!-\dfrac{(\sqrt{9})!}{\sqrt{9}}\\ 35&=(\sqrt{9})!\times (\sqrt{9})!-\dfrac{9}{9}\\ 36&=(\sqrt{9})!\times (\sqrt{9})!\\ 37&=(\sqrt{9})!\times(\sqrt{9})!+\dfrac{9}{9}\\ 38&=(\sqrt{9})!\times \sqrt{9})!+\dfrac{(\sqrt{9})!}{\sqrt{9}}\\ 39&=(\sqrt{9})!\times(\sqrt{9})!+\sqrt{9}\\ 40&=\dfrac{\frac{((\sqrt{9})!)!}{\sqrt{9}}}{(\sqrt{9})!}\\ 41&=\dfrac{\frac{((\sqrt{9})!)!}{(\sqrt{9})!}+\sqrt{9}}{\sqrt{9}}\\ 42&=(\sqrt{9})!\times (\sqrt{9})!+(\sqrt{9})!\\ 43&=\dfrac{\frac{((\sqrt{9})!)!}{\sqrt{9}}}{(\sqrt{9})!}+\sqrt{9}\\ 44&=\dfrac{((\sqrt{9})!)!}{9}-(\sqrt{9})!\times (\sqrt{9})!\\ 45&=(\sqrt{9})!\times 9-9\\ 46&=\dfrac{\frac{((\sqrt{9})!)!}{\sqrt{9}}}{(\sqrt{9})!}+(\sqrt{9})!\\ 47&=\dfrac{9!}{((\sqrt{9})!)!\times 9}-9\\ 48&=9 \times (\sqrt{9})! - (\sqrt{9})!\\ 49&=\dfrac{\frac{((\sqrt{9})!)!}{\sqrt{9}}}{(\sqrt{9})!}+9\\ 50&=\dfrac{9!}{((\sqrt{9})!)!\times 9)}-(\sqrt{9})!\\ 51&=9\times (\sqrt{9})!-\sqrt{9}\\ 52&=9\times (\sqrt{9})!-\dfrac{(\sqrt{9})!}{\sqrt{9}}\\ 53&=9\times (\sqrt{9})!-\dfrac{9}{9}\\ 54&=9\times (\sqrt{9})!\\ 55&=9\times (\sqrt{9})!+\dfrac{9}{9}\\ 56&=\dfrac{9!}{((\sqrt{9})!)!\times 9}\\ 57&=9\times (\sqrt{9})!+\sqrt{9}\\ 58&=(\dfrac{(\sqrt{9})!}{\sqrt{9}})^{(\sqrt{9})!} - (\sqrt{9})!\\ 59&=\dfrac{9!}{((\sqrt{9})!)!\times 9}+\sqrt{9}\\ 60&=9\times (\sqrt{9})!+(\sqrt{9})!\\ 61&=(\dfrac{(\sqrt{9})!}{\sqrt{9}})^{(\sqrt{9})!} - \sqrt{9}\\ 62&=\dfrac{((\sqrt{9})!)!}{9}-9-9\\ 63&=9\times (\sqrt{9})!+9\\ 64&=(\dfrac{(\sqrt{9})!}{\sqrt{9}})^{(\sqrt{9})!}\\ 65&=\dfrac{((\sqrt{9})!)!}{9} - 9 - (\sqrt{9})!\\ 66&=\sqrt{(((\sqrt{9})!)!+(\sqrt{9})!)\times (\sqrt{9})!}\\ 67&=(\dfrac{(\sqrt{9})!}{\sqrt{9}})^{(\sqrt{9})!}+\sqrt{9}\\ 68&=\dfrac{((\sqrt{9})!)!}{9}-\sqrt{9}-9\\ 69&=9\times 9 - 9 - \sqrt{9}\\ 70&=(\dfrac{(\sqrt{9})!}{\sqrt{9}})^{(\sqrt{9})!}+(\sqrt{9})!\\ 71&=\dfrac{((\sqrt{9})!)!}{9}-9\\ 72&=9\times 9 - 9\\ 73&=\dfrac{((\sqrt{9})!)!-9}{9} - (\sqrt{9})!\\ 74&=\dfrac{((\sqrt{9})!)!}{9}-(\sqrt{9})!\\ 75&=9\times 9 - (\sqrt{9})!\\ 76&=\dfrac{((\sqrt{9})!)!-9}{9} -\sqrt{9}\\ 77&=\dfrac{((\sqrt{9})!)!}{9}-\sqrt{9}\\ 78&=9\times 9-\sqrt{9}\\ 79&=\dfrac{((\sqrt{9})!)!-9}{9}\\ 80&=\dfrac{((\sqrt{9})!)!}{9}\\ 81&=9\times 9\\ 82&=9\times 9+\dfrac{9}{9}\\ 83&=\dfrac{((\sqrt{9})!)!}{9}+\sqrt{9}\\ 84&=9\times 9+\sqrt{9}\\ 85&=\dfrac{((\sqrt{9})!)!-9}{9}+(\sqrt{9})!\\ 86&=\dfrac{((\sqrt{9})!)!}{9}+(\sqrt{9})!\\ 87&=9\times 9+(\sqrt{9})!\\ 88&=\dfrac{((\sqrt{9})!)!-9}{9}+9\\ 89&=\dfrac{((\sqrt{9})!)!}{9}+9\\ 90&=99-9\\ 91&=\dfrac{((\sqrt{9})!)!+99}{9}\\ 92&=\dfrac{((\sqrt{9})!)!}{9}+9+\sqrt{9}\\ 93&=99-(\sqrt{9})!\\ 94&=99-\sqrt{9}-\dfrac{(\sqrt{9})!}{\sqrt{9}} \end{aligned}

For 94, I have not found a better solution (and I doubt there is), and I found that for all numbers under 100, all numbers but 94 require at most four 9's.

That's an impressive list!

Calvin Lin Staff - 4 years, 2 months ago

Log in to reply

Yeah, it is quite large (and took me two sessions to do in latex), but I had the solutions written up. I have an iOS app called Tchisla which has similar exercises, and so far, no one has come up with a better solution for 94.

Sharky Kesa - 4 years, 2 months ago

@Sharky Kesa By the way, you have a typo in your equation for 39. It uses a 3.

Geoff Pilling - 4 years, 2 months ago

Log in to reply

Thanks. Thought I had already fixed it.

Sharky Kesa - 4 years, 2 months ago

@Sharky Kesa - Man that was quite the challenge!! ,Here are some that i did differently,

22 = ( 9 ) ! ( 9 + ( 9 ) ! 9 ) 23 = ( ( 9 ) ! ) 9 9 9 32 = 99 9 9 38 = 1 9 ( ( ( 9 ) ! ) ! ( 9 ) ! ( 9 ) ! ) 57 = 1 9 ( 9 ! ( ( 9 ) ! ) ! + 9 ) 63 = 99 ( ( 9 ) ! ( 9 ) ! ) 66 = 99 9 ( 9 ) ! 76 = ( ( 9 ) ! ) ! ( 9 ) ! ( 9 ) ! 9 22=(\sqrt{9})!\left(\sqrt{9}+\dfrac{(\sqrt{9})!}{9}\right)\\ 23=\dfrac{((\sqrt{9})!)^{\sqrt{9}}-9}{9}\\ 32=\dfrac{99-\sqrt{9}}{\sqrt{9}}\\ 38=\dfrac{1}{\sqrt{9}}\left(\dfrac{((\sqrt{9})!)!}{(\sqrt{9})!}-(\sqrt{9})!\right)\\ 57=\dfrac{1}{9}\left(\dfrac{9!}{((\sqrt{9})!)!}+9\right)\\ 63=99-((\sqrt{9})!(\sqrt{9})!)\\ 66=\dfrac{99}{9}(\sqrt{9})!\\ 76=\dfrac{((\sqrt{9})!)!-(\sqrt{9})!(\sqrt{9})!}{9}

Also i think you have to correct 89 89 :)

Anirudh Sreekumar - 4 years, 1 month ago

Log in to reply

I assume in 38 and 57, you don't actually have the 1 there, but should be the expression in the following brackets? Also, great job! You'll find that my solutions give the lowest number of 9's required to create the number.

Sharky Kesa - 4 years, 1 month ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...