Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

While doodling with stuff on Mathematica, I noticed that, empirically, every generalized taxicab number to be representable as multiple sums of two (non-zero) squares is divisible by five:

$\forall n > 1 : 5 \mid \mathrm{Taxicab}(2, 2, n)$

($Taxicab$ defined in Generalized taxicab number.)

This observation is purely empirical, but seems to hold at least to taxicab numbers of value 1010. Some of the smallest sums of two squares that can be represented in $n$ distinct ways are:

$5^2 + 5^2 = 7^2 + 1^2 = 50$

$15^2 + 10^2 = 17^2 + 6^2 = 18^2 + 1^2 = 325$

$24^2 + 23^2 = 31^2 + 12^2 = 32^2 + 9^2 = 33^2 + 4^2 = 1105$

... and this goes on. For instance, $8800358125$ is the smallest such an integer that can be expressed $50$ different ways, and $6076533125$ can be expressed in $80$ ways.

I can't help thinking that this is a well known result. Is there a proof for this conjecture?

EDIT: I note that known $\mathrm{Taxicab}(3, 2, n)$ numbers (except the trivial case of $n = 1$) are divisible by $7$.

share|cite|improve this question
You could look at and and the references – Ross Millikan Jan 28 '14 at 23:58
up vote 1 down vote accepted

Edit: Thanks to A016032 and Ross Millikan's comment, the reason why appears to have been solved here by Joseph Culbertson. It follows Nate's answer and has to do with primes in the form $4k + 1$.

Another link

share|cite|improve this answer
I choose this answer, not because Nate's answer would be wrong, but because the referred page is really a bit more approachable for an armchair mathematician like me. Also, the page shows people have certainly thought of this before. – kirma Jan 29 '14 at 6:13

Suppose a number can be written $N = 2^tp_1^{a_1}...p_k^{a_k}q_1^{b_1}...q_l^{b_l}$ where the $p_i$ are primes congruent to 1 mod 4, and the $q_i$ are primes congruent to 3 mod 4. Then:

A) $N$ can be written as a sum of two squares iff each b_i is even.

B) In this case N can be written as an $ordered$ sum of two squares of $integers$ in $4(a_1+1)(a_2+1)...(a_k+1)$.

Note that part B counts squares of negatives and 0 as well, so for example $5=1^2+2^2=2^2+1^2=(-1)^2+2^2=2^2+(-1)^2=...$ eight ways total.

This theorem follows from unique factorization in $\mathbb{Z}[i]$, I suggest looking up Fermat's two squares theorem. From here, showing this multiple of 5 property is pretty easy.

share|cite|improve this answer
I believe OP is asking for the smallest number expressed as $n$ squares summed. – qwr Jan 28 '14 at 22:39
@qwr Actually, smallest number expressed as two squares summed, representable in $n$ distinct ways... Think of taxicab numbers ( ), but with squares instead of cubes. – kirma Jan 28 '14 at 22:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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