This is in response to a question of evarist that was closed. Evarist's question was this: Do there exist infinitely many triples of consecutive sums of two squares? The topic actually has an interesting history: In 1903 an anonymous reader submitted the following question to the section Mathematical Questions in the British journal The Educational Times - Find all consecutive triples of sums of two squares. Elementary though non-explicit solutions were submitted by A. J. Champneys Cunningham and two other British academics (The reference is Mathematical Questions 14955. Educ. Times (2) 3 (1903), 41-43.) The Cunningham in question is the same one as the Cunningham project is named after. He was an artillery officer in the Indian Army who turned to elementary number theory after he retired.

Later J. E. Littlewood posed the following research problem which generalizes Evarist's first question: Given distinct positive integers h and k, do there exist infinitely many triples n,n+h,n+k that are simultaneously sums of two squares? This was solved in 1973 by C. Hooley, On the Intervals between Numbers that are sums of Two Squares, II. J. Number Theory 5 (1973), 215-217. Hooley's proof that there are infinitely many such triples is not long, but uses the theory of ternary quadratic forms.

The following problem is the reason that I have information relevant to Evarist's question, and together with another Littlewood problem about sums of two squares, the source of my interest in this topic:

For which choices of positive integers $h_1,\ldots,h_r$ are there infinitely many tuples $n + h_1,\ldots,n + h_r$ that are simultanously sums of two squares?

This ties up with Evarist's second question. Clearly a necessary condition is that $h_1,\ldots,h_r$ do not cover all four residue classes modulo $4$, since integers congruent to 3 modulo 4 are not sums of two squares.

EDIT: Greg Martin (see below) has observed that there are other necessary congruence conditions than the one modulo 4. So the answer to the optimistic version of my question is NO, but the above highlighted question still stands. (The optimistic version was that the congruence condition modulo 4 would be sufficient).

(By the way, I have not been able to find Littlewood's statement of his research problem, and actually he may have considered the more general problem too. I could not find the n,n+h,n+k problem in the collection of research problems that he published, though his other and better known problem about sums of two squares is there).

I think the general case of the above problem is likely to be difficult. I had planned a project for a master's thesis to obtain more computational evidence, to establish special cases, and possibly to generalize the Cochrane-Dressler result discussed below, but no student with the requisite background was interested, so nothing came of it.

Actually, there is an unsolved problem directly connected to Evarist's first question too. In 1987 T. Cochrane and R. E. Dressler used the Selberg sieve to obtain un upper bound $$ A(x) \ll \frac{x}{\log^{3/2}(x)} $$ for the counting function $A(x)$ of the triples of consecutive sums of two squares. The reference is Consecutive triples of sums of two squares, Archiv der Math. 49 (1987), 301-304. One would expect a lower bound of the same order of growth, and actually an asymptotic estimate, but this is not known. (The distribution of consecutive pairs of sums of two squares has been investigated, and more is known in this case).

Cochrane and Dressler give a very simple argument for Evarist's first question. The integers 8,9,10 are sums of two squares. Suppose n+1,n,n-1 are sums of two squares. Then $n^2 + 1$, $n^2$ and $n^2 - 1 = (n - 1)(n +1)$ are also sums of two squares, the last by the Brahmagupta-Fibonacci identity $(x^2 + y^2)(u^2 + v^2) = (xu + yv)^2 + (xv - yu)^2$ that shows that products of sums of two squares are sums of two squares.

  • 2
    $\begingroup$ Sounds like you should probably go on meta, ask to reopen, then answer with this. $\endgroup$ Sep 9, 2010 at 18:28
  • $\begingroup$ (@Marius: I took the liberty of editing and adding the link to the question you are referring to. I apologize in case this is not correct.) $\endgroup$ Sep 9, 2010 at 18:37
  • $\begingroup$ @Pietro: That is fine. $\endgroup$ Sep 9, 2010 at 18:53
  • 5
    $\begingroup$ This is certainly very enlightening, in particular, the historical overview, but what is the question here? At the risk of being accused of being a member of "thought police", I'd like to point out that in contrast with various blogs, wikis, and other mathematics websites whose purpose is to inform, the mission of this site is to answer specific research level mathematics questions. $\endgroup$ Sep 9, 2010 at 19:50
  • 1
    $\begingroup$ There will be other congruence conditions as well. For example, integers that are multiples of 3 but not 9 are not sums of two squares, which rules out two of the nine residue classes modulo 9; thus a necessary condition is that h_1, ..., h_r do not cover eight distinct residue classes modulo 9 (and certain configurations of six or seven residue classes are also prohibited). There will be necessary conditions of this sort for every prime congruent to 3 (mod 4), although only finitely many of them will come into play for any fixed value of r. $\endgroup$ Sep 11, 2010 at 23:52

2 Answers 2


As it stands, the problem is hopeless. The answer is yes for $h = (0,1,2)$ (by this I mean the vector $h_1 = 0$, $h_2 = 1$, $h_3 = 2$) by Cochrane and Dressler, and the same argument also works for $h = (0,1,2,5)$. Since $(0,1,2,3)$ is impossible, the "smallest" nontrivial problem is $(0,1,2,4)$. Is there a simple way of treating this one?

In general, the condition that the $h_i$ do not cover all residue classes modulo $4$ is much too weak. Consider e.g. $h = (0,2,4,6)$. If $n$ is odd, then $n$ or $n+2$ is $\equiv 3 \bmod 4$; if $n$ is even and $n+h$ is a sum of two squares, then so is $(n+h)/2$ because of $$ a^2 + b^2 = \Big(\frac{a-b}2\Big)^2 + \Big(\frac{a+b}2\Big)^2. $$ Thus if the answer were positive for $h = (0,2,4,6)$, then it would also be positive for $h = (0,1,2,3)$, which it is not.

  • 3
    $\begingroup$ You can get the vector (0,1,2,4) by taking a solution to $x^2-1=2y^2$ and forming $(4y^2,4y^2+1,2x^2, 4y^2+4)$ $\endgroup$ Sep 12, 2010 at 14:24
  • $\begingroup$ Actually the Pell-equation argument gives $(0,1,2,a)$ where $a$ can be written as a sum of two squares. So the first non-trivial problem is perhaps $(0,1,2,21)$. $\endgroup$ Sep 12, 2010 at 14:58
  • $\begingroup$ Yes, the condition that not all residue classes modulo 4 are covered is much too weak. This is also follows from Greg Martin's observation. $\endgroup$ Sep 12, 2010 at 15:16

Victor called my attention to this. Good man.

My sequence of questions eventually led to this relevant fact, that the Green-Tao theorem shows that the sum of two squares represents arbitrarily long arithmetic progressions of numbers, where these can be assumed to be primes. The three questions are

Can a positive binary quadratic form represent 14 consecutive numbers?

The Green-Tao theorem and positive binary quadratic forms

Does a positive binary quadratic form represent a set of primes possessing a natural density

This is not strictly stronger or weaker than "$h_1,\ldots,h_r$ are there infinitely many tuples $n + h_1,\ldots,n + h_r$" as, for example, we get to say very little about the common difference for the arithmetic progression. In that sense it is weaker than the idea of Marius in prescribing the $h_j.$ And my questions relied on changing the quadratic form from $x^2 + y^2$ to whatever seemed to work.

  • $\begingroup$ @Will: Actually, the idea of prescribing the $h_j$ is due to Littlewood, not to me. The only source I have for the statement of his research problem is Hooley's paper, and it is quite possible that Littlewood also considered the case of arbitrary many $h_j$. $\endgroup$ Sep 10, 2010 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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