# consecutive integers that are not the sum of 2 squares. [closed]

Are there any $n\in\mathbb{N}$ such that no element $k\in\{n,n+1,n+2,...,n+2017\}$ can be expressed as $a^2+b^2$ for some $a,b\in\mathbb{Z}$?

## closed as off-topic by man and laptop, Namaste, The Phenotype, Xam, ShaileshFeb 3 '18 at 5:26

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – man and laptop, Namaste, The Phenotype, Xam, Shailesh
If this question can be reworded to fit the rules in the help center, please edit the question.

• The set of members of $\Bbb N$ that are sums of 2 non-zero squares of integers has asymptotic density $0$ in $\Bbb N,$ so we can answer that there are infinitely many such $n$ without giving a single example.( Not the most direct method!) – DanielWainfleet Feb 2 '18 at 22:24

Yes. Let $p_1, p_2, \cdots, p_{2018}$ be distinct primes of the form $4k+3$. By Chinese Remainder Theorem there exists $n$ such that
\begin{aligned} n &\equiv p_1 &\pmod{p_1^2}\\ n &\equiv p_2 - 1 &\pmod{p_2^2}\\ &\vdots\\ n &\equiv p_{2018} - 2017 &\pmod{p_{2018}^2}. \end{aligned}
Then $\{n, n+1 , \cdots, n+2017\}$ satisfies your requirements.
• Note that this will generate a number with several thousand digits. The smallest n that satisifies the condition is probably much smaller than one generated by this method. Compare, for example, the proof that there are arbitrarily large prime gaps because none of $k! + 2, k! + 3,\ldots, k! + k$ are prime. This isn't meant to say that the answer is wrong, just to point out a natural further question. – Michael Lugo Feb 2 '18 at 18:09
The set $E$ of numbers of the form $a^2+b^2$ has density zero, in particular there are at most $\frac{CN}{\sqrt{\log N}}$ numbers of such form in $[1,N]$ for large values of $N$. Assuming that there is a number of such form in each interval with length $2018$ gives that the density of $E$ is at least $\frac{1}{2018}$, contradiction.