Find the sum of all positive integers n ≤ 2 0 0 such that n 2 + ( n + 1 ) 2 is a perfect square.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The three such numbers are 3 , 20 and 119 . therefore the sum is 142
I used TI-83 PLUS and programed for
x
=
0
E
N
T
E
R
x
+
1
S
T
O
x
:
x
2
+
(
x
+
1
)
2
and pressed for 200 entries, and noted any integer answer..
n
=
3
,
2
0
a
n
d
1
1
9
t
o
g
e
t
s
q
a
r
e
s
o
f
5
,
2
9
,
a
n
d
1
6
9
r
e
s
p
e
c
t
i
v
e
l
y
.
Problem Loading...
Note Loading...
Set Loading...
For n 2 + ( n + 1 ) 2 to be a perfect square, there must exist a positive integer m such that
m 2 = n 2 + ( n + 1 ) 2 = 2 n 2 + 2 n + 1
⟹ 2 m 2 = 4 n 2 + 4 n + 1 + 1 ⟹ 2 m 2 + ( 2 n + 1 ) 2 + 1 ⟹ ( 2 n + 1 ) 2 − 2 m 2 = − 1 .
This last equation is in the form of a negative Pell's equation, i.e., x 2 − d y 2 = − 1 with d a non-square integer. In this case x = 2 n + 1 , y = m and d = 2 .
There are an infinite number of solutions to this equation, but the first few that are relevant to this problem are ( x , y ) = ( 1 , 1 ) , ( 7 , 5 ) , ( 4 1 , 2 9 ) , ( 2 3 9 , 1 6 9 ) , yielding values for x = n of 0 , 3 , 2 0 and 1 1 9 . Since we are only looking for positive integers n the sum comes out to 3 + 2 0 + 1 1 9 = 1 4 2 .
Comment: Since Pell's equations have been extensively studied I didn't go into details about how to obtain the first few relevant solutions. I will make note, though, of a recursive method of finding 'successive' solutions given a 'fundamental' solution. If ( x n , y n ) is a positive solution then ( x n + 1 , y n + 1 ) is given by x n + 1 = 3 x n + 4 y n and y n + 1 = 2 x n + 3 y n . So starting with a fundamental solution of ( 1 , 1 ) , the subsequent solutions are ( 7 , 5 ) , ( 4 1 , 2 9 ) , ( 2 3 9 , 1 6 9 ) , ( 1 3 9 3 , 9 8 5 ) , . . . . . This last pair yields a value for n of 6 9 6 > 2 0 0 , so neither this nor any subsequent pairs were relevant to this particular question.