Consider an integer x. If we add 30, then the result is a perfect square. If we subtract 30, the result is also a perfect square. How many such integers are there?"

Let x be the number.

anna_gg wrote:

Consider an integer x. If we add 30, then the result is a perfect square. If we subtract 30, the result is also a perfect square. How many such integers are there?"

So two perfect squares differ by 60. The difference between two perfect squares *n*² and (*n*+*m*)² is 2*m**n*+*m*². Consider then all possible values of *n* and *m* such that 2*m**n*+*m*²=60. NB: (i) Obviously *m* has to be even. (ii) We can also assume WLOG than both *m* and *n* are positive.

From here on 60−*m*², and hence *n*, will always be negative. Hence two are only three such integers, which are

Here is my solution: It is based to the fact that each perfect square N^2 is the sum of the first N odd numbers (5^2 = 25 = 1+3+5+7+9).

Thus the difference of any 2 perfect squares should equal to the sum of consecutive odd numbers (and this should equal 60).

Starting from 1, we write down the sums of the odd numbers:

1+3+5+7+9+11+13 = 49 while 1+3+5+7+9+11+13+15 = 64. Thus we cannot make 60 starting from 1.

We do the same with 3: 3+5+7+9+11+13=48 while 3+5+7+9+11+13+15 = 63. Not possible.

Starting from 5:

5+7+9+11+13+15=60 Here we are.

So, one perfect square is 4 and the next is 64, their difference being 60, so the first number we are looking for is 34 (34-30 = 4 and 34+30 = 64, both of them perfect squares).

Similarly, we find that the only other sum of consecutive odd numbers equaling 60 is 29+31.

Therefore one perfect square is 1+3+5+...+27=196 (14^2) and the next is 1+3+5+...+27+29+31=256 (16^2) and the second number we are asking for is 226 (226-30 = 196, 226+30 = 256).

There is no other series of successive odd numbers equaling 60, so these two are the only numbers with this property.

Obviously this is not a proper "proof"; it is more based on a "guess and try" method, but it works!

Have you seen my proof? It's very similar in that it's based on consecutive odd numbers.

]]>Thus the difference of any 2 perfect squares should equal to the sum of consecutive odd numbers (and this should equal 60).

Starting from 1, we write down the sums of the odd numbers:

1+3+5+7+9+11+13 = 49 while 1+3+5+7+9+11+13+15 = 64. Thus we cannot make 60 starting from 1.

We do the same with 3: 3+5+7+9+11+13=48 while 3+5+7+9+11+13+15 = 63. Not possible.

Starting from 5:

5+7+9+11+13+15=60 Here we are.

So, one perfect square is 4 and the next is 64, their difference being 60, so the first number we are looking for is 34 (34-30 = 4 and 34+30 = 64, both of them perfect squares).

Similarly, we find that the only other sum of consecutive odd numbers equaling 60 is 29+31.

Therefore one perfect square is 1+3+5+...+27=196 (14^2) and the next is 1+3+5+...+27+29+31=256 (16^2) and the second number we are asking for is 226 (226-30 = 196, 226+30 = 256).

There is no other series of successive odd numbers equaling 60, so these two are the only numbers with this property.

Obviously this is not a proper "proof"; it is more based on a "guess and try" method, but it works!]]>

Yes, I like that proof. Good reasoning, and with a process of elimination at the end that leaves only those two possibilities.

]]>And I did it non-experimentally!

I did it diferent again:D

]]>

]]>

I only searched as far as shown in my image, because at that point:

The numbers that are squared (I don't know what they're called) to produce the perfect squares must differ by at least 1.

*EDIT: The column E heading should be "If Col D = integer, print B + 30".*