## The One Four Conjecture

I can’t remember when I first heard of the “Four Fours” puzzle.  The goal is to use four 4’s to create as many different integers as possible using basic arithmetic operations.  For example,

$42=44-\dfrac4{\sqrt 4}.$

Which numbers are possible to obtain depends on the range of operations or functions allowed.  Using a decimal point and a bar for a repeating decimal, for example, allows expressions such as

$103=\dfrac{44}{.\overline 4}+4.$

A few years ago, I wondered about what numbers are possible using just one 4.  Of course there aren’t many if you restrict yourself to the basic arithmetic operations.  But you can write $4!= 24,$ for example.

So the factorial was a way to make numbers larger, but then what about bringing those factorials back down?  The square root function does that, but then you need to convert to an integer.  So perhaps use the floor function, so that the second function you use is

$f(n)=\lfloor\sqrt n\rfloor.$

Now this is a bit trickier — even small numbers are not so easy to obtain.  For example,

$5=\left\lfloor\sqrt{\left\lfloor\sqrt{\left\lfloor\sqrt{\left\lfloor\sqrt{\left\lfloor \sqrt{(4!)!}\right\rfloor}\right\rfloor}\right\rfloor}\right\rfloor}\right\rfloor.$

That’s a lot of work just to get 5….  But as I kept on exploring using Mathematica, it seemed that eventually, you could get every positive integer this way!

At first, it was really hard to believe — but the more I worked, the more plausible it became.  It soon became obvious that other numbers other than 4 were possible to begin with.  You could start with 9, for example, since then you could get 4 by

$4=\left\lfloor\sqrt{\left\lfloor\sqrt{\left\lfloor \sqrt{9!}\right\rfloor}\right\rfloor}\right\rfloor,$

and then proceed from there.

Further, why use a square root?  Could other roots work as well?  More experimentation seemed to suggest that any root might also work.  This led me to the following:

The One $n$ Conjecture:  Suppose $n>2$ and $p>1$ are given.  Then using the factorial function and the function

$f(n)=\lfloor n^{1/p}\rfloor,$

all positive integers may be obtained by some composition of these functions.

This seemed really difficult to prove.  Suppose, for example — using the factorial and square root functions — it is impossible to obtain some particular integer no matter what input you start with.  Of course it is always possible to obtain $n$ from $n^2,$ and $n^2$ from $n^4,$ and so on, but you’ve got to get larger first, and that requires some use of the factorial.

It turns out, however — in a particular sense (which you’ll see in a moment) — it is always possible, for any $p.$

The Possibility Lemma:  Suppose $p>1$ is given.  Then for any positive integer $k>1,$ there exist positive integers $q,m$ such that

$k=f(f(f\cdots f(m!)),$

where the function $f$ is composed $q$ times.

Let’s focus on the square root for now — that is, $p=2.$  The Possibility Lemma is only a starting point, since it turns out that most of the time, the smallest $m$ need to generate a particular $k$ is actually greater than $k$ — making an induction proof based on the Lemma impossible.

For example, for $k=42,$ the smallest $m$ is $218$ with $q=8,$ so that

$42=f(f(f(f(f(f(f(f(218!)))))))).$

But for $k=43,$ we get

$43=\left\lfloor\sqrt{\left\lfloor \sqrt{10!}\right\rfloor}\right\rfloor.$

It seemed that the least $m$ needed to generate a given $k$ exhibited rather erratic behavior.  So my next step was to plot a graph of the least $m$ given $k.$

I won’t go into all the details here — but it took a little work to optimize the algorithms.  As an example, the smallest $m$ needed to generate $k=48,\!500$ is $m=890,\!827,$ and computations with such large factorials take time.  It turns out that the trick was to compute in advance the first 1,000,000 factorials as floating point numbers.  A little accuracy is lost as result, but several checks suggested that even so, the correct value of $m$ is found each time.

So here is the plot of values for the least possible $m$ for $k$ from 1 to 5,000.

And here’s the plot for values of $k$ from 1 to 40,000.

Now here’s something interesting!  You can’t help but think “fractal behavior” here.  And why the thin bands?  Not sure yet, but they somehow correspond to square roots of factorials.  For example, the $m$ for 49,998 is 470,324, and the $m$ for 49,999 is 248,312, and the square root of 470,324! is not too far off from 248,312!.

But although it looks like there are thin bands, they are not uniformly generated.  Here’s a closeup of the previous graph in the range 49,900 to 50,000.

There doesn’t seem to be a predictable pattern as to when the jumps are made.

And it does appear that the thin bands have an upward trend.  Might it be possible that every positive integer is eventually the $m$ for some $k$?  Not an easy question to answer.

And this is only a beginning!  I just generated the graph up to 50,000 yesterday, so I haven’t had time to analyze it in any more detail.  Using $p=3$ generates the following graph, so it seems that there may be similar behavior for various $p.$

I plan to keep working on this little puzzle — although I think a proof of or counterexample to the One $n$ Conjecture is rather far off.  When I do make more progress, I’ll give you an update.  Despite the difficulty of the problem, this is a really fun puzzle to play with!  I hope you might give it a try, too….