# difference of squares of consecutive numbers

We know that difference of squares of two consecutive numbers forms an A.P. of odd numbers.

Then I was working on consecutive numbers and found that if difference of squares of two consecutive numbers is also a square, then one of the two numbers is either multiple of 5 or a prime number.

Now I need a counter example for this fact.

And the main thing ,, how I reached that ??

So I took only perfect squares from the A.P. I mentioned above

Then I found that if the difference is $n$ ,then numbers will be $\frac {n+1}{2}$ and $\frac {n-1}{2}$

So if $n$ has unit digit 1,4,9,6 then one of the two number is multiple of 5

Now I have left with the squares ending with 5 or 0 which are giving me prime numbers

How can I proceed with that??

If I understood your problem correctly, complete parametric solution is given by $$(2n^2+2n+1)^2-(2n^2+2n)^2=(2n+1)^2,$$ where $n\in\Bbb{Z}.$

• yeah, now we just have to show why it is possible for both of those not to be primes or multiples of $5$. Dec 27 '16 at 17:55

Counterexample: $1512,1513$.

None of them is a multiple of $5$.

None of them is a prime number.

And of course: $1513^2-1512^2=55^2$.

• Other counterexamples 2812, 2813; 5512, 5513; 6612, 6613; 7812, 7813; 9112, 9113. Dec 27 '16 at 17:57

As Nil showed, the solutions are obtained by taking $(2n^2+2n+1,2n^2+2n)$ with $n=5k+2$..

So the solutions are given by $(50k^2+50k+13,50k^2+50k+12)$ such that the first term isn't prime.

• and it is easy to prove that an integer polynomial takes an infinite number of composite values. Dec 27 '16 at 18:06