This puzzle was inspired by one recently posted by @Max.

What is the smallest positive integer that cannot be made from four 8s, where bracketing is allowed and the only permitted operations are addition, subtraction, multiplication, division, rooting (so the square root is allowed, because the symbol does not require the writing of a number to specify which root, and for example the eighth and 88th roots are also allowed, using up one and two 8s respectively: the rule is that you can use the radical symbol, $\surd \,$), exponentiation, taking the absolute value, and the floor and ceiling functions? All other operations, such as taking logarithms, are not allowed.

If the number exists, it is greater than 100. (See @Marius's answer to @Max's question.)

But it is not clear that it does exist, because there is no largest integer that can be made from four 8s. Although

$$\Huge 8^{ \raise.1ex{\Big(} 8^{(8^{\huge 8})} \raise.1ex{\Big)} }$$

is a very large number, it can be exceeded by inserting a sufficiently large number of $\surd$ symbols into the expression

$$\left\lceil \frac{\huge 8}{\sqrt{\sqrt{\sqrt{\large 8 \raise1.8ex\,}}} ~ \raise.2ex- ~ \Large\frac{8}{8}} \right\rceil ~ \raise-4ex.$$

If the required number does not exist, prove its non-existence, for example by showing how to construct a four-8s expression for any given positive integer.

  • $\begingroup$ But then this comes as a question without 100% answer... $\endgroup$
    – Cockabondy
    Oct 5, 2017 at 13:14
  • $\begingroup$ OK, I will edit to say find the number or show it does not exist. $\endgroup$
    – h34
    Oct 5, 2017 at 13:15
  • $\begingroup$ Isn't "Find the highest integer number that can be made..." a clearer question? (Which, obvisoully, would be X-1 to your answer.) $\endgroup$
    – BmyGuest
    Oct 5, 2017 at 13:23
  • $\begingroup$ @BmyGuest - There is no highest integer that can be made: see the last paragraph of the question. But there may be a smallest integer that cannot be made. $\endgroup$
    – h34
    Oct 5, 2017 at 13:30
  • 1
    $\begingroup$ let's try to make all the numbers :) $\endgroup$
    – Marius
    Oct 5, 2017 at 15:17

4 Answers 4


Bear with me for any poor formatting. I think I have a way to generate any number using equations of this form:


Equations of this form can be written as:


And then for large a (not even very large):

$8^{0.5^a}-1 \approx \ln{8}*0.5^a$

Which is its own separate proof. The rate that the above equation converges won't matter since we'll be dealing with arbitrarily large a. But it seems to converge quickly.

Now we make the substitution:


Which is equivalent to:


You'll notice that if we can get:


to be any number we like, we can get X to be any number we like. And we can!

Let's suppose I want to make the number 2017. Then:

$\left(a+\frac{\ln{\ln{8}}}{\ln{0.5}}\right)(0.5^b)=\frac{\ln{\frac{8}{2017.5}}}{\ln{0.5}}\approx 7.97835295...$

We can match this with arbitrary precision! For instance a=8365910, and b=20

So we plug our values back in:


I tried looking for a calculator that can do this, and this site seems to handle it. But you have to specify precision, such as with


Which will return 2017.4993496403731... which of course rounds down to 2017. You'll notice I set 2017.5 as my original target so that the floor function had plenty of room to round down.

EDIT: Quick proof of that approximate substitution thing I used above:

$\lim_{a\to \infty}{\frac{8^{0.5^a}-1}{\ln{8}*0.5^a}}$
Derive top and bottom since both equal zero (L'Hospital's Rule)
$\lim_{a\to \infty}{\frac{\ln{8}\ln{0.5}*0.5^a8^{0.5^a}}{\ln{8}\ln{0.5}*0.5^a}}$
Cancel out terms
$\lim_{a\to \infty}{8^{0.5^a}}=1$
So they're equal

Some actual values so you can see how quickly it converges.





EDIT EDIT: Fixed a mistake in my meaning.

  • $\begingroup$ Just to be pedantic, you probably mean $8^{0.5^a}-1\sim \ln 8\cdot 0.5^a$ as $a\to\infty$; you can't quite say $\lim_{a\to \infty}{8^{0.5^a}-1}=\ln{8}\cdot 0.5^a$ since $a$, a dummy variable on LHS, can't appear on RHS independently. $\endgroup$
    – Ankoganit
    Oct 7, 2017 at 4:15
  • $\begingroup$ @Ankoganit Whoops, maybe I should edit that. Would it be more correct to have $\lim_{a\to \infty}{(8^{0.5^a}-1=\ln{8}*0.5^a)}=true$? The meaning is likely more clear in my EDIT. $\endgroup$
    – Geoffrey
    Oct 7, 2017 at 4:37
  • $\begingroup$ Uh, taking limit of a statement looks even more wrong :( I'd say the edit is good enough. $\endgroup$
    – Ankoganit
    Oct 7, 2017 at 4:50
  • $\begingroup$ I think your statement is equivalent to saying that $\lim_{x\rightarrow 1^+}\Large(\large\frac{1+ \log x}{x}\Large)\small= 1.$ $\endgroup$
    – user36946
    Oct 7, 2017 at 9:15

Having thought about this some more, I now think that perhaps all positive integers can be made and therefore the required number does not exist. I'm putting this as a separate answer from my first effort, because this lot of handwaving points in the other direction from the first lot.

Consider the number


in which


is the index of the root shown using the expression's largest radical symbol, namely the first of the sequence of three in its right hand part. (All other instances of the symbol denote square roots.)


adding $\sqrt{}$s on the left makes the index of the root smaller and smaller, getting closer to 0, which makes the value of the whole expression ever larger,


adding them on the right makes the value of the whole expression ever smaller.

We can make positive integers of the form $X(a,b)$, where

$a$ and $b$ are the numbers of instances of $\sqrt{}$ on the left and right respectively, so that

enter image description here

and where

increasing $a$ increases X, whereas increasing $b$ decreases it.

I conjecture that by choosing the right values of $a$ and $b$ we can probably get X to be any positive integer we like.


This is a bit of handwaving that suggests that the required number does exist.

Call an expression "basic" if it does not contain any instances of $\sqrt{}$.

* Basic expressions are finitely many.

* In each basic expression, the places in which the $\sqrt{}$ symbol may be permissibly inserted are also finitely many.

* In each of these places there is no upper bound on the number of $\sqrt{}$ symbols that may be inserted, and the constructibility of infinitely many numbers is equivalent to the insertability of however many $\sqrt{}$ symbols you like at each of these places.

Now $\sqrt{}$ is not a finely tunable tool. If you have only one number, say 100, and you are allowed to use $\sqrt{}$ as many times as you like, you can make 10, and using floor and ceiling functions you can make 1, 2, 3 and 4, but you can't make every positive integer. Given any positive integer, can you make it by choosing one of the finitely many basic expressions containing four 8s and then distributing sufficiently many instances of $\sqrt{}$ into each of the finitely many places where you can insert them? I doubt it.

  • 1
    $\begingroup$ I'm not so sure of this now. Given that there is no ban on the index of a root being something other than an implied 2, or 8, 88, or 888, both the index and the argument of a $\sqrt{}$ could contain a string of $\sqrt{}$s. $\endgroup$
    – h34
    Oct 5, 2017 at 16:57

If you're allowed an increasing monadic operator (e.g. !) by which you can make arbitrarily large integers, a decreasing monadic operator (e.g. sqrt) by which you can turn an arbitrarily large number into a number arbitrarily close to 1, and the floor and/or ceiling operator to turn a real into an integer, you can get any positive integer.

  • 1
    $\begingroup$ Do you happen to have a proof for this? $\endgroup$
    – Ankoganit
    Oct 5, 2017 at 14:59
  • $\begingroup$ In this puzzle, "(a)ll other operations (than the ones mentioned) are not allowed", so the factorial function is not allowed. But I don't think the statement in this answer is correct. Let the decreasing function be $\sqrt{}$, or in other words $f(n):=x^{-2^{m}}$; let the increasing one be $g(n):=x^{8^{k}}=x^{2^{3k}}$. $\endgroup$
    – h34
    Oct 5, 2017 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.