Gaps between integers that are neither square-free nor a square

Call an integer square-in if it is not square-free or a square. Can two consecutive square-in numbers have a gap of $<8$ integers between them, exactly one of these integers in this 'gap' being a square? If this is possible are there infinitely many?

• The equations $x^2-Ny^2=1$ for fixed square-free $N$ have infiniely many solutions; take $N=2$. You can find – P Vanchinathan Mar 29 '14 at 2:43
• This question is quite clear, if a bit awkwardly phrased. No reason to close. – Erick Wong Mar 29 '14 at 3:15
• Note; there can only a maximum of 3 squarefree numbers consecutively together in an interval. If two consecutive square-in integers have two consecutive squares between them ,say $(m^2)$ and $(m+1)^2$ with m > = 2 then between the two squares there would > = 4 squarefree in this gap. So any two consecutive square-in integers could have at most one square between them. So such a gap of consecutive square-ins would have a maximum of 8 integers between them.. – user128932 Sep 18 '14 at 21:51
• I should have said , any two consecutive square-ins could have one square between them or no square. There would be ≥ 4 integers in this gap with one or no squares . So if 5 or more integers in this gap this contradicts . Therefore the gap can have a maximum of 4 integers so the two consecutive square-ins would have a difference of ≤ 5 integers.. – 201044 Mar 30 '16 at 2:18

The equations $x^2-Ny^2=1$ for fixed square-free $N$ have infinitely many solutions; take $N=2$. You can find $3^2- 2. 2^2=1$. Write this as $(3+2\surd2)(3-2\surd2)=1$. Now raising both sides to any $n$ th power you get infinitely many square-in pairs differing by 1. (This problem has been addressed by Brahmagupta several centuries ago and was wrongly called Pell's equation by Euler).
• Technically $x^2$ is not square-in, but I'm sure a similar construction should do the trick. For starters, solving $x^2-3y^2=1$ and multiplying by $2$ gives a gap of size $\le 2$. – Erick Wong Mar 29 '14 at 3:11
There can only be a maximum of 3 square-free numbers consecutively together in an interval. If two consecutive square-in integers have two consecutive squares between them , say $m^2$ and $(m+1)^2$ with m >=2 then between the two squares there would be >= 4 consecutive square-free integers in this gap; contradiction. So any two consecutive square-in integers could have at most one square between them. So a gap of consecutive square-ins would have a maximum of 8 integers between them.