# When Does There Exist an Integer $n$ So $a_1 + n, a_2 + n, ...,a_9 + n$ Are All Perfect Squares for $9$ Distinct Natural Numbers?

Let $$a_1, a_2, ...,a_9$$ be $$9$$ distinct positive integers. My question is, when(What properties should $$a_i$$ have) does there exist an integer $$n$$ so $$a_1+n,a_2+n,...,a_9+n$$ are all perfect squares?

EDIT 1

If there does exist an $$n$$ for which $$a_1+n,a_2+n,...,a_9+n$$ are all perfect squares, can we say there is an integer $$n' < n$$ so that $$a_1 + n',a_2+n',...,a_9+n'$$ are also all perfect squares?

EDIT 2

Here's some information about $$a_1,a_2,...,a_9$$:$$1.$$They all have the same parity. $$2.$$ If such $$n$$ exists, then $$a_i+n \equiv 1$$(mod 3).

Here's what I've tried:

Let $$A = \{a_1,a_2,...,a_9\}$$ and $$x,y\in A$$ where $$x < y$$. Now, obviously $$y = x + r$$ for some positive integer $$r$$ so we are looking for two squares whose difference is $$r$$. Let those two squares be $$t^2$$ and $$(t + s)^2$$ for some natural numbers $$t$$ and $$s$$. $$(t+s)^2 - t^2 = 2ts + s^2$$ so we need to be able to write $$r$$ as $$2ts + s^2$$ for some natural numbers $$t$$ and $$s$$ but I don't know when $$r$$ has this property or not.

UPDATE $$1$$(Before the edit)

$$r = 2ts + s^2 = s(2t + 1)$$ and if $$s = 1$$, then $$r = 2t + 1$$ so if $$r$$ is odd it can be written as $$2ts + s^2$$ and we're done?

UPDATE $$2$$ (Before the edit)

There's at least $$5$$ items of $$A$$ which have the same parity which results in $$r$$ being even for some $$a_i$$ and $$a_j$$ and therefore $$s$$ can't always be $$1$$ but will always be a divisor of every $$r$$.

Thanks in advance for any help!

• Edit 2 in effect says $a_i=6n+1\ \text{or}\ a_i=6n+4$ Jun 6, 2019 at 1:20
• @KeithBackman My bad. By $a_i \equiv 1$(mod 3), I meant $a_i+n \equiv 1$(mod 3). Fixed it. Jun 6, 2019 at 1:56

I don't think the answer is easy to analyse.

Consider each mod. For example, squares are $$\equiv0,1\pmod 4$$ so there are at most $$2$$ residues $$\pmod 4$$ for your $$9$$ numbers. You can do the similar thing for all other mods.

On the other hand, choose any 9 squares and subtract by any number (as long as the smallest >0) will give such a set of $$a_i$$s.

• I updated the question. Could you please explain to me why I might be wrong(Since you said the answer might be difficult)? Jun 5, 2019 at 12:56
• @BornaGhahnoosh you said in your answer about two numbers. Consider add a third number in and see what happens. The point here is that maybe $t$ and $s$ can add 40 so they both become a square however $t$ and $k$ need to add 50 so they both become a square. Jun 5, 2019 at 13:02

You have found $$s$$ must be a factor of $$r$$. So, given, $$a_1$$ and $$a_2$$, there are only a few possible $$n$$ that will work. For each, test the other seven $$n+a_i$$.

• I actually can't do that because I have many, many, many sets of $9$ natural numbers and I need to see if there is any set for which that $n$ exists. Jun 5, 2019 at 13:28

Wlog. $$a_1. If $$a_i+n=s_i^2$$, then $$a_i-a_j=(s_i+s_j)(s_i-s_j)$$. Hence all differences must be factorable into same-parity factors (i.e., cannot be $$\equiv 2\pmod 4$$). We also get a bound $$a_9-a_1\ge s_9^2-(s_9-8)^2=16s_9-64$$, i.e., $$s_9\le \frac{a_9-a_1}{16}+4.$$ This already leaves us with a limited choice for $$0\le s_1<\ldots.

The question as posited assumes the numbers $$a_i$$ are arbitrarily chosen, and suitable $$n$$ is to be identified within that arbitrary setting. Within the confines of that assumption, the answer to the stated question is plainly "No". Without knowing more about the $$a_i$$, we cannot say that suitable $$n$$ do or do not exist. For example, if it happened that $$a_i=i$$, then the $$9$$ resulting $$a_i+n$$ would be consecutive numbers, and there are no nine consecutive squares. On the other hand, if the $$a_i$$ all happened to be $$1$$ less than a square, then $$n=1$$ would work. So the real question becomes, what are the limitations on $$a_i$$ that would permit an $$n$$ to be found? If such conditions were to be identified, then almost perforce that would identify suitable $$n$$ as well.

As to the question added in your edit, if the answer to that question were in general "Yes," then by descent, the proposition would be true for $$n=1$$. In that case, each of the $$a_i$$ would have to be (fortuitously) $$1$$ less than a perfect square. And if the $$a_i$$ were all $$1$$ less than a perfect square, then it is doubtful (I haven't looked in detail) that they would all be $$n$$ less than a different set of squares; that would require finding $$9$$ sets of two squares where the difference between the squares in each set was $$n-1$$.

• I just added some new information about $A$. Could you please update your answer according to that? Jun 5, 2019 at 21:30