Find the smallest odd positive integer such that the sum of consecutive perfect squares cannot be a multiple of 2017.
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.
Let n = 2 d + 1 , where d is a positive integer. A sequence of n consecutive perfect squares can be written as
{ ( x − d ) 2 , … , ( x − 1 ) 2 , x 2 , ( x + 1 ) 2 , … ( x + d ) 2 } ,
where x is a positive integer greater than d . The i th term of this sequence is ( x − ( d − i + 1 ) ) 2 .
The sum of the terms of the sequence is equal to
i = 1 ∑ 2 d + 1 ( x − ( d − i + 1 ) ) 2 = i = 1 ∑ 2 d + 1 x 2 − 2 x i = 1 ∑ 2 d + 1 ( d − i + 1 ) + i = 1 ∑ 2 d + 1 ( d − i + 1 ) 2 = ( 2 d + 1 ) x 2 − 2 x [ d ( 2 d + 1 ) − 2 ( 2 d + 1 ) ( 2 d + 2 ) + ( 2 d + 1 ) ] + 2 i = 1 ∑ d i 2 = ( 2 d + 1 ) x 2 − 2 x [ ( d + 1 ) ( 2 d + 1 ) − ( 2 d + 1 ) ( d + 1 ) ] + 2 [ 6 d ( d + 1 ) ( 2 d + 1 ) ] = ( 2 d + 1 ) x 2 + 3 d ( d + 1 ) ( 2 d + 1 ) .
Assume that this sum is a multiple of 2017 i.e. it is equivalent to 0 modulo 2017. This means
( 2 d + 1 ) x 2 + 3 d ( d + 1 ) ( 2 d + 1 ) x 2 + 3 d ( d + 1 ) x 2 + 6 7 2 ( 3 ) 6 7 2 d ( d + 1 ) x 2 + 2 0 1 6 6 7 2 d ( d + 1 ) x 2 − 6 7 2 d ( d + 1 ) x 2 ≡ 0 ( m o d 2 0 1 7 ) ≡ 0 ( m o d 2 0 1 7 ) ≡ 0 ( m o d 2 0 1 7 ) ≡ 0 ( m o d 2 0 1 7 ) ≡ 0 ( m o d 2 0 1 7 ) ≡ 6 7 2 d ( d + 1 ) ( m o d 2 0 1 7 ) .
Let ( p a ) denote the Legendre symbol . Since 2 0 1 7 ≡ 1 ( m o d 8 ) , we have ( 2 0 1 7 2 ) = 1 . Since 2 0 1 7 ≡ 1 ( m o d 1 2 ) , we have ( 2 0 1 7 3 ) = 1 . Also, by the law of quadratic reciprocity,
( 2 0 1 7 7 ) ( 7 2 0 1 7 ) ( 2 0 1 7 7 ) ( 7 1 ) ( 2 0 1 7 7 ) = ( − 1 ) ( 2 0 1 6 ) ( 6 ) / 4 = 1 = 1 .
Using these values together with the properties of the Legendre symbol, we have
( 2 0 1 7 6 7 2 d ( d + 1 ) ) = ( 2 0 1 7 6 7 2 ) ( 2 0 1 7 d ) ( 2 0 1 7 d + 1 ) = ( 2 0 1 7 2 ) 5 ( 2 0 1 7 3 ) ( 2 0 1 7 7 ) ( 2 0 1 7 d ) ( 2 0 1 7 d + 1 ) = ( 2 0 1 7 d ) ( 2 0 1 7 d + 1 ) .
Now, notice that
( 2 0 1 7 5 ) ( 5 2 0 1 7 ) ( 2 0 1 7 5 ) ( 7 2 ) − ( 2 0 1 7 5 ) ( 2 0 1 7 5 ) = ( − 1 ) ( 2 0 1 6 ) ( 4 ) / 4 = 1 = 1 = − 1 .
Thus, a = 5 is the smallest value of a such that ( 2 0 1 7 a ) = − 1 , since ( 2 0 1 7 4 ) = ( 2 0 1 7 2 ) 2 = 1 . If we set d = 4 , we find that ( 2 0 1 7 d ) ( 2 0 1 7 d + 1 ) = ( 2 0 1 7 4 ) ( 2 0 1 7 5 ) = − 1 , meaning that there does not exist x such that x 2 ≡ 6 7 2 d ( d + 1 ) ( m o d 2 0 1 7 ) .
Thus, the smallest value of n such that the sum of n consecutive perfect squares is not divisible by 2017 is n = 2 ( 4 ) + 1 = 9 .