# Looking for a reference about a problem on the number of representations of an integer as a sum of two squares

Few years ago I came accross a paper, or maybe a solution of a problem from a journal (possibly AMM or something like that) in which the following result was proved:

The smallest positive integer that can be represented as a sum of two squares in exactly $2^s$ ways (where $s\geqslant 2$ is a given integer) equals the product of $s-2$ smallest integers of the form $q^{2^l}$, where $q$ is a prime $\equiv 1\pmod 4$, and $l$ a nonnegative integer.

(This is not an exact quote, but my restatement of the result.) I am not sure whether this was the main result of the reference in question, or there were some other results in the same text. Anyway, I tried to find the mentioned reference, but without success. I vaguely recall that the problem is from some journal available on JSTOR (in fact, AMM first comes to mind), but I may well be wrong on that point. Is there anyone who knows what I am talking about?

Thank you very much in advance.

P. S. I am not looking for the proof of the mentioned result, it is not hard to prove it. I am looking specifically for the reference I remember, because I would like to put that reference in a book that I am currently writing.

• Thank you, but it is not the same thing. These theorems only show in how many ways a given number can be represented as a sum of two squares (which is very well-known). In my question the number of representations is given in advance, and we are looking for the smallest $n$ with that many representations. – bbasic Nov 14 '17 at 22:32
• @bbasic The exact result you describe does not seem to be the sort of thing that would be the main result of a paper, so an exact reference may be a problem. Note that the smallest number cannot be divisible by $2$ or by any prime $q \equiv 3 \pmod 4.$ After that it depends on what you are counting, primitive representations or not, allowing variables to be zero or negative, or not. I did a version of this at math.stackexchange.com/questions/2349068/… – Will Jagy Nov 14 '17 at 23:08