4

The four fours puzzle is, given a number $n$, how can you represent $n$ with common (or more specifically, elementary) mathematical functions and 4 or less occurrences of the digit 4.

On the wikipedia page, it says there is a general solution to represent any integer $n$ with 4 fours: $$n = -\sqrt4\frac{\ln\left[\left(\ln\underbrace{\sqrt{\sqrt{\cdots\sqrt4}}}_{n}\right) / \ln4\right]}{\ln{4}}$$

And this works, for any integer. My question is - can with generalize this to 4 of any number? Formally, given an integer $n$, and a (non-zero) integer $j$, is there a general method or formula to represent $n$ with $4$ $j$'s, using only elementary functions?

Jyrki Lahtonen
  • 133,153
Nico A
  • 4,934
  • 4
  • 23
  • 49

1 Answers1

1

Yes! The four $j$'s problem is also solvable up to $+\infty$. First observe $$\frac{\ln\underbrace{\sqrt{...\sqrt{j}}}_n}{\ln j}=\frac{\ln j^{2^{-n}}}{\ln j}=\frac{2^{-n}\ln j}{\ln j}=2^{-n}.$$ From this we can craft our solution: $$\ln\left[\frac{\ln\underbrace{\sqrt{...\sqrt{j}}}_n}{\ln j}\right]/\ln\left[\frac{\ln\sqrt{j}}{\ln j}\right]=\frac{\ln(2^{-n})}{\ln(2^{-1})}=\frac{-n\ln 2}{-\ln 2}=n$$