Find the number of strictly increasing arithmetic progressions of length three, with terms from 1 to 1 0 0 0 , that consist entirely of perfect squares.
Details and assumptions
The length of an arithmetic progression is the number of terms that it has.
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.
I tried a geometrical approach, which well wasn't the best evidently.
let us assume that the numbers a 2 , b 2 , c 2 form an arithmetic progression. then we should have that: a 2 + c 2 = 2 b 2 or equivalently: ( b a ) 2 + ( c a ) 2 = 2 substitute X = b a , Y = c a . we have: X 2 + Y 2 = 2 . let C be the curve of zeroes of the polynomial: P ( X , Y ) = X 2 + Y 2 − 2 so we have ( X , Y ) a rational point on the curve C . obviously ( 1 , 1 ) is another rational point on C distinct from ( X , Y ) since a , b , c are distinct. let m be the slope of the line passing through points X , Y and 1 , 1 ( X , Y ) and ( 1 , 1 ) are rational points so m is a rational number. we have: Y − 1 = m ( X − 1 ) so: X 2 + ( m X − m + 1 ) 2 = 2 solving the quadratic equation we get that: X = m 2 + 1 m 2 − 2 m − 1 and Y = m 2 + 1 − m 2 − 2 m + 1 . let m = s r . where r is an integer and s is a non-zero integer. so the solutions of the equation a 2 + c 2 = 2 b 2 are: ( r 2 − 2 r s − s 2 , r 2 + s 2 , − r 2 − 2 r s + s 2 ) . back to main problem, we should have that ( r 2 + s 2 ) 2 < 1 0 0 0 or equivalently r 2 + s 2 ≤ 2 5 . doing a few case works, we get the solutions: ( a , b , c ) = { ( 1 , 5 , 7 ) , ( 2 , 1 0 , 1 4 ) , ( 3 , 1 5 , 2 1 ) , ( 4 , 2 0 , 2 8 ) , ( 7 , 1 3 , 1 7 ) , ( 7 , 1 7 , 2 3 ) , ( 1 7 , 2 5 , 3 1 ) }
This solution uses ideas about rational points on an algebraic curve, and is worthwhile to understand. All other solutions relied heavily on the bounded constraints, instead of providing a general understanding of the problem.
A direct solution is to realize that ( a − c ) 2 + ( a + c ) 2 = ( 2 b ) 2 , and proceed by the classification of Pythagorean triplets. Note that one of the ways to classify these triplets is through the algebraic curve method as described.
A 3-term arithmetic progression of squares x 2 , y 2 , z 2 is equivalent to a solution of 2 y 2 = x 2 + z 2 with 0 < x < z . In order for this to happen, 2 y 2 must have more than one representation as a sum of two squares (since y 2 + y 2 is already one such representation).
By the classical theory of sums of two squares, this happens precisely when y has a prime factor of the form 4 k + 1 , and the number of representations increases with the number of such factors.
Since 1 ≤ y ≤ 3 1 , this gives only a handful of choices to start with: y ∈ { 5 , 1 0 , 1 5 , 2 0 , 2 5 , 3 0 , 1 3 , 2 6 , 1 7 , 2 9 } .
In the case y = 5 there is a unique progression 1 2 , 5 2 , 7 2 . This solution scales uniquely to the cases y = 1 0 , 1 5 , 2 0 , 3 0 which are not divisible by any additional primes of the form 4 k + 1 .
The case y = 2 5 also has 5 2 , 2 5 2 , 3 5 2 , but it admits a second progression because it is twice divisible by 5. Indeed, since 7 2 + 2 4 2 = 2 5 2 , we have ( 2 4 − 7 ) 2 + ( 2 4 + 7 ) 2 = 2 ⋅ 2 5 2 , which yields the progression 1 7 2 , 2 5 2 , 3 1 2 .
The unique progression for y = 1 3 is 7 2 , 1 3 2 , 1 7 2 , and doubling this gives the unique progression for y = 2 6 . The unique progression for y = 1 7 is 7 2 , 1 7 2 , 2 3 2 , and the unique progression for y = 2 9 is 1 2 , 2 9 2 , 4 1 2 .
By the way, an easy way to spot these solutions is to use complex numbers. A quick search shows that 2 9 = 5 2 + 2 2 , so the magnitude of 5 + 2 i is 2 9 , and the magnitude of ( 5 + 2 i ) 2 = 2 1 + 2 0 i is 29, and the magnitude of ( 5 + 2 i ) 2 ( 1 + i ) = 1 + 4 1 i is 2 9 2 , meaning that 1 2 + 4 1 2 = 2 ⋅ 2 9 2 .
Compiling all of these solutions we have the 11 progressions
1 2 , 5 2 , 7 2
2 2 , 1 0 2 , 1 4 2
3 2 , 1 5 2 , 2 1 2
4 2 , 2 0 2 , 2 8 2
6 2 , 3 0 2 , 4 2 2
5 2 , 2 5 2 , 3 5 2 and 1 7 2 , 2 5 2 , 3 1 2
7 2 , 1 3 2 , 1 7 2
1 4 2 , 2 6 2 , 3 4 2
7 2 , 1 7 2 , 2 3 2
1 2 , 2 9 2 , 4 1 2
Of course we discard 4 of these since their last terms are too large. This leaves 7 valid progressions.
PHP code:-
<?php
function is_decimal( $val )
{
return is_numeric( $val ) && floor( $val ) != $val;
}
for($x=1;$x<1000;$x++)
{
for($y=1;$y<1000;$y++)
{
$a1=$x; $a2=$x+$y; $a3=$x+2*$y; if(!is_decimal(sqrt($a1))){ if(!is_decimal(sqrt($a2))){ if(!is_decimal(sqrt($a3))){ if($a2<1000 && $a3<1000){ echo $x." & ".$y."<br/>"; } } } };
}
}
?>
Clearly,we have to search for such numbers from squares of 1 to 31...Let the end terms of the A.P. be a & b...Clearly,a & b must be of same parity(both odd or both even). Little tests reveals that 1,5,7 suffices...now if we take corresponding multiples of this triplet then,those would also suffice the conditions...Hence we get four such triplets {1,5,7} till {4,20,28}... Now listing out the numbers' squares from 4 to 31,we test for other such same-parity end terms triplets using a+c=2b form of A.P. We find {7,13,17},{7,17,23},{17,25,31}... Thus there are 7 pairs in all,as the last pair has end term 31,& we cannot further get another such triplet less than 31.
Problem Loading...
Note Loading...
Set Loading...
A triple of squares ( a 2 , b 2 , c 2 ) with 0 < a < b < c is an arithmetic progression if and only if a 2 + c 2 = 2 b 2 . If one of the numbers a or c is even and the other is odd, then 2 b 2 will be odd, which is impossible. Thus, a and c have the same parity. Consider x = 2 c − a , y = 2 c + a , which are both nonzero. Then the equation a 2 + c 2 = 2 b 2 is equivalent to x 2 + y 2 = b 2 . So we are really looking for the number of Pythagorean triples (not necessarily coprime) with 1 0 0 0 ≥ c 2 = ( x + y ) 2 . This is equivalent to x + y ≤ 3 1 .
From the theory of Pythagorean triples, one can easily see that these triples are ( 3 , 4 , 5 ) , ( 6 , 8 , 1 0 ) , ( 9 , 1 2 , 1 5 ) , ( 1 2 , 1 6 , 2 0 ) ; ( 5 , 1 2 , 1 3 ) ; ( 7 , 2 4 , 2 5 ) ; ( 8 , 1 5 , 1 7 )
Given ( x , y , b ) , we can obtain ( a , b , c ) = ( y − x , b , y + x ) . This gives us the solutions ( 1 , 5 , 7 ) , ( 2 , 1 0 , 1 4 ) , ( 3 , 1 5 , 2 1 ) , ( 4 , 2 0 , 2 8 ) , ( 7 , 1 3 , 1 7 ) , ( 1 7 , 2 5 , 3 1 ) , ( 7 , 1 7 , 2 3 ) . Therefore, the answer is 7 .