Copyright © University of Cambridge. All rights reserved.

$$ A=\frac{(10^4+324)(22^4+324)(34^4+324)(46^4+324)(58^4+324)}{(4^4+324)(16^4+324)(28^4+324)(40^4+324)(52^4+324)} $$

Can you find the value of $A$ without using a calculator?

This problem appeared in a recent maths contest in the U.S.A.. I managed to solve it, but was curious to find out how the examiner had constructed this problem. Is it a coincidence that $A$ is an integer? What is the significance of the numbers increasing by $12$? What is special about $324$?

If you haven't already solved the problem then I will give you a hint:

$$ 324=18^2 $$ and \begin{eqnarray} a^4 + 18^2 & = & (a^2+18)^2 - 2\times 18 a^2 \textrm{ [complete the square]}\\ & = & (a^2+18)^2 - (6a)^2 \textrm{ [difference of squares]}\\ & = & (a^2+18-6a)(a^2+18+6a)\\ & = & [(a-3)^2+(3)^2][(a+3)^2+(3)^2] \end{eqnarray} Can you find $A$ now?

For example, $$ 10^4+324=[(10-3)^2+3^2][(10+3)^2+3^2]=(7^2+3^2)(13^2+3^2) $$ and $$ 22^4+324=[(22-3)^2+3^2][(22+3)^2+3^2]=(19^2+3^2)(25^2+3^2) $$ We find $$ A=\frac{(7^2+3^2)(13^2+3^2)(19^2+3^2)(25^2+3^2)(31^2+3^2)(37^2+3^2) (43^2+3^2)(49^2+3^2)(55^2+3^2)(61^2+3^2)}{(1^2+3^2)(7^2+3^2)(13^2+3^2) (19^2+3^2)(25^2+3^2)(31^2+3^2)(37^2+3^2)(43^2+3^2)(49^2+3^2)(55^2+3^2)} $$ or, $$
A=\frac{61^2+3^2}{1^2+3^2}=373 $$ We are led to an interesting question: What is the relationship between the numbers in the problem which makes possible all the calculations?

If we want to see what is going on, then we could try using some algebra.

Using our previous method, $$ a^4+b^2=(a^2+b)^2-2a^2 b. $$ If we are going to use $$ x^2-y^2=(x+y)(x-y) $$ then we want $2b$ to be a perfect square. Now we see the significance of $18$ in our problem: $$ 2\times 18=36=6^2 $$ If $2b$ is a perfect square then $b$ must be double a perfect square so put $b=2c^2$.

Let us rework our algebra with $c$ instead of $b$. $$ a^4+b^2=a^4+(2c^2)^2=a^4+4c^4 $$ and \begin{eqnarray} a^4+4c^4 & = & (a^2+2c^2)^2-4a^2c^2\\ & = & [a^2+2c^2-2a c][a^2+2c^2 +2a c]\\ & = & [(a-c)^2+c^2][(a+c)^2+c^2]. \end{eqnarray} Now we need to factorize terms like $10^4+324$. We need $a=10$ and $c=3$. So, $$ 10^4+324=10^4+4\times 3^4=(7^2+3^2)(13^2+3^2) $$ So far so
good, but what has caused all the cancelling? A little thought will convince you that we need to increase $a$ by $4c$ each time as we move to the right. So $$ 10+(4\times 3)=22 $$ and $$ 22+(4\times 3)=34 $$ etc.

Also, in the denominator, we need to start with $$ 10-(2\times 3)=4. $$ Where do we go from here? I tried to choose other values of $a$ and $c$ to produce other problems.

For example, $$ B=\frac{(7^4+64)(15^4+64)(23^4+64)(31^4+64)(39^4+64)}{(3^4+64) (11^4+64)(19^4+64)(27^4+64)(35^4+64)} $$ Find $B$. (A calculator may only be used to check your answer!)

If your algebra is good enough (try it!) you may be able to prove the general formula: $$ \prod_{r=0}^{r=n}\frac{[x+(4r+2)c+c]^4+4c^4]}{[x+4r c+c]^4+4c^4}= \frac{[x+4(n+1)c]^2+c^2}{x^2+c^2}. $$ Check that $x=1$, $c=3$, $n=4$ gives our original problem. Also, $x=1$, $c=2$, $n=4$ gives $B=337$.

Let us return to the three questions posed near the beginning of this article. $324$ is special because it can be written as $4c^4$. Also, we can see that $r$ increases by $1$, $x+(4r+2)c+c$ increases by $4c$. When $c=3$ this increase is $12$. There remains a matter of $A$ being an integer.

We end up with an integer only when $x^2+c^2$ is a factor of $[x+4(n+1)c]^2+c^2$. When does this happen? I cannot see an easy way to deal with this in general, but we can look at particular cases. For example, $B$ has $x=1$ and $c=2$, so we want $5$ to be a factor of $(1+8n+8)^2+4$. Now, $$ (8n+9)^2+4=64n^2+144n+85=5(12n^2+28n+17)+4n^2+4n $$ So we need $4n^2+4n=4n(n+1)$ to be divisible by
$5$.

So we can choose $n=4$, $5$, $9$, $10$ etc.

For $A$, I calculate that $n$ must be $3$, $4$, $8$, $9$, $13$, $14$ etc.

Readers might like to use a computer to find other values of $x$, $n$ and $c$ satisfying these conditions.

As a check on your understanding, prove that: $$ \frac{(5^4+4)(9^4+4)(13^4+4)(17^4+4)}{(3^4+4)(7^4+4)(11^4+4)(15^4+4)}=65 $$ Can you make up a problem for your friends?

Finally, please consider this problem from the 1969 International Olympiad:

"Prove that there are infinitely many natural numbers $a$ with the following property: The number $z=n^4+a$ is not prime for any natural number.''

If you want to solve this yourself, read no further!

There is a clue in the fact that this article is based on the factorisation of numbers of the form $p^4+4q^4$.

For $z=n^4+a$, we can choose $a=4c^2$. Then, \begin{eqnarray} z & = & n^4+4c^4\\ & = & (n^2+2c^2)^2-4n^2c^2\\ & = & (n^2+2c^2+2n c)(n^2+2c^2-2n c)\\ & = & [(n+c)^2+c^2][(n-c)^2+c^2] \end{eqnarray} If $c\geq 2$ then both factors are at least $4$, so $z$ cannot be prime

So, choose $a=4c^4$ with $c=2$, $3$, $4$, $\ldots$.

There are infinitely many numbers of this form. For each of them, $z$ can be factorised, whatever the value of $n$.