# Get $5$ by doing any operations with four $7$s

How can one combine four sevens with elementary operations to get $5$? For example $$\dfrac{(7+7)\times7}{7}$$ (though that does not equal $5$). I am not able to do this. Can you solve it or prove that it's impossible?

• @Tunk-Fey I suppose you were the user who created the (brainteaser) tag. Is it really needed? What is the difference between this tag and (puzzle)? Maybe we could continue the discussion in chat, so that we do not leave here comments which are completely irrelevant to the actual question. – Martin Sleziak Sep 6 '14 at 9:40

## 10 Answers

How about:

$$7 - \frac{7+7}{7} = 5$$

$$7 - \log_7 (7·7) = 5$$

$$7 - \frac{\ln (7·7)}{\ln 7} = 5$$

$$\left\lfloor \sqrt{\frac{7^7}{7!}} - 7\right\rfloor = 5$$

$$\lfloor 7\sin 777^\circ\rfloor = 5$$

$$\lfloor 7\cos 7^\circ\rfloor - \frac{7}{7} = 5$$

$$\lfloor 7\cos 7\rfloor = 5 \text{ using radians}$$

You can also use base $174$ and write:

$$\sqrt{\frac{77}{7·7}} = 5$$

That can also reduce the amount of sevens by one if you write:

$$\frac{\sqrt{77}}{7} = 5$$

• I know this is not a community answer. So, how did you alone come up with all these expressions in a day from the moment the question was asked? Is it because of what you practice in your daily life to be able to answer quickly? On the other hand, could you please explain how your one solution using base 174 yields the result 5. – RAM Sep 3 '14 at 18:36
• All of the answers seem to be things you could come to relatively quickly but where and how did you come up with the base 174 answer...? Also why base 174 surely there's a smaller base where the same thing is achievable?Maybe?Also,Also, What about a base that uses only 7's? – KBusc Sep 3 '14 at 18:46
• @NeerajT 77 in base 174 is equal to $7*174 + 7*1 = 1225$ in base 10. 7, being a one-digit number, is the same in all bases. So in base 10 $1225/(7*7) = 25$, the square root of which is 5. – Aaron Dufour Sep 3 '14 at 18:54
• There are a lot of other options for the base, I wrote the $174$ one because it was the first one to come to mind. Essentially, if $b$ is the base, you need: $$77 = 7^{2^n}5^{2^n} \Leftrightarrow b = 7^{2^n-1}5^{2^n} -1$$ or $$77 = 7·5^{2^n} \Leftrightarrow b = 5^{2^n}-1$$ In the first case $$\frac{\sqrt{\ldots\sqrt{77}}}{7} = 5$$ and in the second case $$\sqrt{\ldots\sqrt{\frac{77}{7}}} = 5$$ In both cases you use $n$ nested square roots. Base $174$ comes for $n=1$ of the fist case, but you can use base $24$ wich comes for $n=1$ of the second case. – Darth Geek Sep 3 '14 at 19:23
• @DarthGeek Thanks for your mind-blowing formulae. 1. Could you please tell us how you came up with these formulas or direct us to a reference containing their derivations. 2. Please share your tips with us so that we may be able to come up with expressions just like you did and help others to become like you. – RAM Sep 4 '14 at 5:02

Perhaps: $$7-\frac{7+7}{7}=7-2=5$$

• Kind of a duplicate of the accepted answer. – Cole Johnson Sep 2 '14 at 22:16
• @Cole By 15 seconds – user142198 Sep 3 '14 at 3:39
• @user142198 I know! Isn't it great how time works? – Cole Johnson Sep 3 '14 at 14:21
• @ColeJohnson I am not entirely sure what that post was meant to mean. I will assume Dunning–Kruger on your part. – user142198 Sep 9 '14 at 3:56

Don't forget $$\frac{7! \mod 77}{7}$$ (and I haven't used any sneaky $2$s, either).

To get it down to three $7$s, you might try $$7 - \left\lceil .7 + .7 \right\rceil$$

You can also do it with only two $7$s: $$\left\lfloor{\sqrt 7 + \sqrt 7}\right\rfloor$$

(Can anyone do it with a single $7$?)

• Sure you have, and a sneaky 6,5,4, and 3 as well ;) – Jemmy Sep 3 '14 at 15:03
• Since floor, ceil and log functions as well as factorials are apparently considered elementary, I would like to add $$\lceil\log{(7!!)} \rceil=5$$ with $n!!$ being the double factorial, i.e. $7!! = 1\cdot 3 \cdot 5 \cdot 7$. – Thomas Sep 5 '14 at 7:42

With four 7's you can get any positive integer you want by just changing the number of squar roots in the following equation:

$$\frac{\ln\bigg{(}\frac{\ln(7)}{\ln(\sqrt{\sqrt{\sqrt{\sqrt{\sqrt{7}}}}})}\bigg{)}}{\ln\bigg{(}\frac{\ln(7)}{\ln(\sqrt{7})}\bigg{)}}=5$$

For example, you could get 35 by using 35 square roots. We aren't even really using the 7, you could equally use any other integer >1.

EDIT: Moved to only four 7's instead of five, based on Darth's suggestion.

• $$\ln\frac{7+7}{7} = \ln 2 = \ln \frac{\ln 7}{\ln \sqrt{7}}$$ So you only need four sevens ;D – Darth Geek Sep 3 '14 at 20:11

Maybe:

$\frac{((7^2-7)-7)}7=5$

• You are using a $2$ for the square – Darth Geek Sep 2 '14 at 16:50
• @DarthGeek If floor is elementary operation, that squaring is also. Think of $2$ as of symbol, denoting squaring, nothing more. – Antoine Sep 2 '14 at 21:55
• If using $2$ for a squaring operation is not allowed, using square roots shouldn't be allowed as they are the same as raising to the ${^1/_2}$ power. – Cole Johnson Sep 2 '14 at 22:11
• You could always denote it as $\operatorname{sqr}(7)$, too. – wchargin Sep 3 '14 at 3:32
• @Alpedar or maybe $77-77+5$. Don't worry about the $5$, it's just a symbol denoting $5$, nothing more... – chiastic-security Sep 3 '14 at 11:40

OK, here's the ultimate: you can do it with a single $7$. It starts with the observation that when $n$ is smallish, $\ln n!$ is a little, but not much, greater than $n$. By repeatedly applying factorial, natural log and floor, we can get the value to creep up to around $5^2$.

$$\left\lfloor\sqrt{\ln\left(\left\lfloor\ln \left(\left\lfloor\ln \left(\left\lfloor\ln \left(7!\right)\right\rfloor!\right)\right\rfloor!\right)\right\rfloor!\right)}\right\rfloor = 5$$

I know you had four $7$s to use. But think of all the things you can do with the three $7$s you'll have left over!

• $\lceil \log(7!!) \rceil$ with $n!!$ the double factorial is sligthly more elegant ;) – Thomas Sep 5 '14 at 7:51
• @sonystarmap Nice! I suppose it depends on what's allowable as a "standard" operation. It might be considered stretching it a bit when you feel obliged to explain the notation you've used ;) – chiastic-security Sep 5 '14 at 8:34
• Thats probably right, I just wanted to make sure that $n!! \not = (n!)!$ – Thomas Sep 5 '14 at 9:30

How about $$\lfloor7-\ln7\rfloor=5$$ I use only two $7$s.

$$\lfloor7+7-\ln 7!\rfloor=5$$ That's three $7$s.

But if you insist on using four $7$s $$\lfloor7-7+7-\ln 7\rfloor=5.$$

How about

$$f(7, 7, 7, 7)$$

where we define

$$f(x, y, z, w) = 5$$

for all $x, y, z, w$. (Clearly, the constant function on four parameters is an elementary operation.)

• While the question as written does not state this at all clearly, I suspect that by elementary operations they intended addition, subtraction, multiplication, and division. – Semiclassical Sep 3 '14 at 18:31

How about : $\Delta_{Q(\sqrt7)}/7+7/7$, $\Delta$ being the discriminant of a number field.

7-(7+7)/7

I started looking for a way to use the modulus operator, but this is too simple.

• that would be 7. – Michael Stocker Sep 3 '14 at 14:40
• Yes, I was trying to be too clever with the mod, what I really needed was just a simple division :/ – Darren Sep 3 '14 at 14:42
• Hmm, it's now the same as the first two answers, though! – chiastic-security Sep 3 '14 at 15:08