This question was asked in the Crux Mathematicorum , October edition , Pg -$5$ , which can found be Here.

The question states that :

Both $4$ and $52$ can be expressed as the sum of two squares as well as exceeding another square by $3$ : $$4 = 0^2+2^2 \quad\,, \, 4-3=1^2 $$ $$52 = 4^2+6^2 \quad\,, \, 52-3=7^2 $$ Show that there are an infinite number of such numbers that have these two characteristics.

My attempt :

I Found $4,52$ and $292$ to have this characteristics. An interesting feature I noticed was $$4 = \color{red}{0^2}+2^2 \quad\,, \, 4-3=\color{green}{1^2}$$ $$52 =4^2 + \color{red}{6^2} \quad\,, \, 52-3=\color{green}{7^2}$$ $$292 = 6^2 + \color{red}{16^2} \quad\,, \, 292-3=\color{green}{17^2}$$

If a number $y$ satisfies this property , then it might be written as :

$$y= a^2+b^2 = c^2+3$$

And based on the above examples , I conjectured that : $$(k)^2 + b ^2 = (k+1)^2 + 3$$

where $a=k$ and $c=k+1$.

This expression on simplifying gives us :

$b^2 = 2(k+2)$ . For R.H.S to be a perfect square , $(k+2)$ must be of the form $2x^2$ , which on solving , gives $k = 2x^2-2$ and $b$ comes out to be $2x$.

So a solution is given by $\color{blue}{(a,b,c) = (2x^2-2,2x,2x^2-1)}$

And our number becomes $y = 4(x^4 - x^2 + 1)$ for all $x\in\mathbb{N}$ and hence there are infinite numbers with this characteristics.

Although ' maybe ' this proves the question , it is not quite rigorous method to do this . Also , it does not provide all the possible numbers as we have only taken the special case when $a=k \,\,, c= k+1$.

What is the better way to solve this problem and the general formula for the number?

Bonus Question : Prove that the highest power of two dividing the number is $2.$ Or more generally ,show that :

$$2^c\nmid y \quad \quad \text { For any } c \ge 3.$$

Verified it for all $y\le1.5\times10^5$ and it seems quite likely to be true . For my case , where $y = 4(x^4 - x^2 +1)$ , this is obvious as $x^4-x^2+1$ is always odd and hence the number is only divisible by $4$. But what about the other numbers ?

Edit :

The first $5$ numbers with this characteristics are : $$4 = 0^2+2^2 \quad\,, \, 4-3={1^2}$$ $$52 =4^2 + {6^2} \quad\,, \, 52-3=7^2$$ $$292 = 6^2 + {16^2} \quad\,, \, 292-3={17^2}$$ $$628 = 12^2 + {22^2} \quad\,, \, 628-3={25^2}$$ $$964 = 8^2 + {30^2} \quad\,, \, 964-3={31^2}$$

  • 7
    $\begingroup$ As a way to solve the original Crux question your solution seems exemplary. Finding all the solutions looks harder! $\endgroup$
    – almagest
    Dec 5, 2019 at 11:16
  • $\begingroup$ math.stackexchange.com/questions/74931/… $\endgroup$
    – individ
    Dec 5, 2019 at 11:43
  • $\begingroup$ $$b=b+2$$ $$c=c+1$$ math.stackexchange.com/questions/794510/… $\endgroup$
    – individ
    Dec 5, 2019 at 11:45
  • 1
    $\begingroup$ @individ Agree with you that these are not the nicest answers , but I believe there are some clever tricks involved to give a much neater solution. $\endgroup$ Dec 5, 2019 at 12:37
  • 1
    $\begingroup$ Here's a trick. Decompose any number by the difference of squares. The main thing that was a multiple of 4 or odd was. $$c^2-a^2=(c-a)(c+a)=b^2+3$$ For any number there are solutions. $\endgroup$
    – individ
    Dec 5, 2019 at 12:47

2 Answers 2


There are infinitely many even numbers. Let us assume that $b$ is even, as doing so does not limit the number of possible solutions. We can rearrange the original equation to $$c^2-a^2=b^2-3$$ where $b^2-3$ must be odd.

It is well know that the sum of the first $n$ odd numbers equals $n^2$. Consequently, every odd number is the difference of two consecutive squares. It may also be the difference of other pairs of squares, but it is at least the difference of two consecutive squares.

Therefore, every odd number $b^2-3$ can be represented in at least one way as the difference of two squares.

For example, choose $b=6$ (an even number), so $b^2-3=33$.

$33$ is the $17$th odd number, and the sum of the first $17$ odd numbers is $17^2=289$. The $17$th odd number succeeds the $16$th odd number, and the sum of the first $16$ odd numbers is $16^2=256$. Plainly, $289-256=33=b^2-3$. It is also the case that $49-16=33$ (which is one of OP's original instances), but that is not necessary to establish that the number of solutions is infinite.

Added by edit: In my answer as originally posted, I addressed only the question as to whether there are infinite solutions. That garnered a query by OP as to whether all solutions can be found. The answer to that is yes, but the formulation is somewhat involved.

Based on the fact that $\sum_{i=1}^k(2i-1)=k^2$ we can show that any odd number is the difference of two squares: $n=r^2-s^2$

The formula $(\sum_{i=1}^{\frac{n+1}{2}}(2i-1))-(\sum_{i=1}^{\frac{n-1}{2}}(2i-1))$ represents the difference of two consecutive squares. Each sum contains the same terms, which by subtraction cancel, except the first sum contains an extra term corresponding to $2(\frac{n+1}{2})-1$ which simply equals $n$. In order that the indices on the sums be integers, it is required that $n$ be odd, but beyond that, any odd number affords a solution. This more fully explains the conclusion presented in my first answer.

If $n$ has integer factors, a larger set of solutions is available. Let $t$ be a factor of $n$. Then $$n=\Biggl(\sum_{i=1}^{\frac{\frac{n}{t}+t}{2}}(2i-1)\Biggr)-\Biggl(\sum_{i=1}^{\frac{\frac{n}{t}-t}{2}}(2i-1)\Biggr)$$ with the following constraints: $\frac{n}{t}>t$ so that the indices are greater than $0$ and $\frac{n}{t}\equiv t \bmod 2$ so that the indices are integers. The first sum is the square of the superior index $$\Bigl(\frac{\frac{n}{t}+t}{2}\Bigr)^2=\frac{(\frac{n}{t})^2+2n+t^2}{4}$$ The second sum is the square of the superior index $$\Bigl(\frac{\frac{n}{t}-t}{2}\Bigr)^2=\frac{(\frac{n}{t})^2-2n+t^2}{4}$$ Subtracting the second from the first yields $\frac{4n}{4}=n$

So when $n$ has appropriate factors, it can be represented in additional ways as the difference of two squares.

In the context of the question, we can set $n=b^2-3$. It is not necessary to write out all of the terms and indices explicitly here; the principles have been demonstrated.

In the example I used, $b=6$, the resulting $b^2-3=33$ is divisible by $3$. this affords indices $\frac{\frac{33}{3}\pm 3}{2}=7,4$ yielding $7^2-4^2=33$. Since the other factor of $33$ is $11$ and $\frac{33}{11}\not > 11$, this factor does not satisfy the constraints, and we have found all solutions corresponding to $b=6$.

  • 1
    $\begingroup$ Your bonus question is resolved by looking at matters $\bmod 8$. You want $c^2+3$ to be even, so $c$ most be odd. Since any odd square is $\equiv 1 \bmod 8$, it follows that $c^2+3\equiv 4 \bmod 8$. In other words $8\not \mid (c^2+3)$, hence no higher power of $2$ can divide it either. $\endgroup$ Dec 9, 2019 at 16:37
  • $\begingroup$ Of course !! That was too trivial . $\endgroup$ Dec 9, 2019 at 16:39

Brainstorming from doing something similar with pythagorean triples.

If $b^2 = 2a + 1 + 3=2a+4$ then $a^2 + b^2 = a^2 + 2a + 1 + 3 = (a+1)^2 + 3$.

If $b$ is any even number, $2k; k > 1$ then if $a = \frac {(2k)^2-4}2= 2k^2-2$

And if $c = 2k^2 -1$ then

$a^2 + b^2 = $

$(2k^2 -2)^2 + 4k^2 =$

$4k^4 - 8k^2 + 4 + 4k^2 =$

$4k^4 - 4k^2 + 1 + 3 =$

$(2k^2 - 1)^2 + 3=$

$c^2 + 3$.

Yep.... that seems to do it.


Perhaps more formally I should have done

$a^2 + b^2 = c^2 + 3 \implies$

$c^2 - a^2 = b^2 -3$

$(c-a)(c+a) = b^2 -3$

If I let $d = c-a$ be an odd number and $e = d+2a = c+a$ be a larger odd number then so long as we have

$b^2 -3 = d*e$ is an odd number then we have a solutions.

So if $b$ is any even number $> 2$ then $b^2 -3$ is odd number. If we let $b^2 -3 = d*e; d< e$ be any factors of $b^2-3$ (if $b^2 -3$ is prime or a prime square we can let $d = 1$ and $e=b^2 -3$). Then we let $a = \frac {e-d}2$ and $c = \frac {e+d}2$ we then have

$b^2 -3 = d*e = (c-a)(c+a) = c^2 - a^2$ and

$a^2 +b^2 = c^2 + 3$.


If $b$ is odd and $b^2 -3$ is even then $b= 2k+1$ and $b^2 -3 = 4k^2 + 4k -2$ and is divisible by $2$ but not $4$. $c-a$ and $c+a$ must both be the same parity so this will not be possible.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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