Sum of Squares in 2017

Find the smallest odd positive integer n n such that the sum of n n consecutive perfect squares cannot be a multiple of 2017.


The answer is 9.

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.

1 solution

Steven Yuan
Jul 29, 2017

Let n = 2 d + 1 , n = 2d + 1, where d d is a positive integer. A sequence of n n consecutive perfect squares can be written as

{ ( x d ) 2 , , ( x 1 ) 2 , x 2 , ( x + 1 ) 2 , ( x + d ) 2 } , \left \{(x - d)^2, \dots, (x - 1)^2, x^2, (x + 1)^2, \dots (x + d)^2 \right \},

where x x is a positive integer greater than d . d. The i i th term of this sequence is ( x ( d i + 1 ) ) 2 . (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 d + 1 ) ( 2 d + 2 ) 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 [ d ( d + 1 ) ( 2 d + 1 ) 6 ] = ( 2 d + 1 ) x 2 + d ( d + 1 ) ( 2 d + 1 ) 3 . \begin{aligned} \sum_{i = 1}^{2d + 1} (x - (d - i + 1))^2 &= \sum_{i = 1}^{2d + 1} x^2 - 2x \sum_{i = 1}^{2d + 1} (d - i + 1) + \sum_{i = 1}^{2d + 1} (d - i + 1)^2 \\ &= (2d + 1)x^2 - 2x \left [ d(2d + 1) - \dfrac{(2d + 1)(2d + 2)}{2} + (2d + 1) \right ] + 2 \sum_{i = 1}^{d} i^2 \\ &= (2d + 1)x^2 - 2x[(d + 1)(2d + 1) - (2d + 1)(d + 1)] + 2 \left [ \dfrac{d(d + 1)(2d + 1)}{6} \right ] \\ &= (2d + 1)x^2 + \dfrac{d(d + 1)(2d + 1)}{3}. \end{aligned}

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 + d ( d + 1 ) ( 2 d + 1 ) 3 0 ( m o d 2017 ) x 2 + d ( d + 1 ) 3 0 ( m o d 2017 ) x 2 + 672 d ( d + 1 ) 672 ( 3 ) 0 ( m o d 2017 ) x 2 + 672 d ( d + 1 ) 2016 0 ( m o d 2017 ) x 2 672 d ( d + 1 ) 0 ( m o d 2017 ) x 2 672 d ( d + 1 ) ( m o d 2017 ) . \begin{aligned} (2d + 1)x^2 + \dfrac{d(d + 1)(2d + 1)}{3} &\equiv 0 \! \! \! \! \pmod{2017} \\ x^2 + \dfrac{d(d + 1)}{3} &\equiv 0 \! \! \! \! \pmod{2017} \\ x^2 + \dfrac{672d(d + 1)}{672(3)} &\equiv 0 \! \! \! \! \pmod{2017} \\ x^2 + \dfrac{672d(d + 1)}{2016} &\equiv 0 \! \! \! \! \pmod{2017} \\ x^2 - 672d(d + 1) &\equiv 0 \! \! \! \! \pmod{2017} \\ x^2 &\equiv 672d(d + 1) \! \! \! \! \pmod{2017}. \end{aligned}

Let ( a p ) \left ( \dfrac{a}{p} \right ) denote the Legendre symbol . Since 2017 1 ( m o d 8 ) , 2017 \equiv 1 \! \pmod{8}, we have ( 2 2017 ) = 1. \left ( \dfrac{2}{2017} \right ) = 1. Since 2017 1 ( m o d 12 ) , 2017 \equiv 1 \! \pmod{12}, we have ( 3 2017 ) = 1. \left ( \dfrac{3}{2017} \right ) = 1. Also, by the law of quadratic reciprocity,

( 7 2017 ) ( 2017 7 ) = ( 1 ) ( 2016 ) ( 6 ) / 4 ( 7 2017 ) ( 1 7 ) = 1 ( 7 2017 ) = 1. \begin{aligned} \left ( \dfrac{7}{2017} \right ) \left ( \dfrac{2017}{7} \right ) &= (-1)^{(2016)(6)/4} \\ \left ( \dfrac{7}{2017} \right ) \left ( \dfrac{1}{7} \right ) &= 1 \\ \left ( \dfrac{7}{2017} \right ) &= 1. \end{aligned}

Using these values together with the properties of the Legendre symbol, we have

( 672 d ( d + 1 ) 2017 ) = ( 672 2017 ) ( d 2017 ) ( d + 1 2017 ) = ( 2 2017 ) 5 ( 3 2017 ) ( 7 2017 ) ( d 2017 ) ( d + 1 2017 ) = ( d 2017 ) ( d + 1 2017 ) . \begin{aligned} \left ( \dfrac{672d(d+1)}{2017} \right ) &= \left ( \dfrac{672}{2017} \right ) \left ( \dfrac{d}{2017} \right ) \left ( \dfrac{d + 1}{2017} \right ) \\ &= \left ( \dfrac{2}{2017} \right )^5 \left ( \dfrac{3}{2017} \right ) \left ( \dfrac{7}{2017} \right ) \left ( \dfrac{d}{2017} \right ) \left ( \dfrac{d + 1}{2017} \right ) \\ &= \left ( \dfrac{d}{2017} \right ) \left ( \dfrac{d + 1}{2017} \right ). \end{aligned}

Now, notice that

( 5 2017 ) ( 2017 5 ) = ( 1 ) ( 2016 ) ( 4 ) / 4 ( 5 2017 ) ( 2 7 ) = 1 ( 5 2017 ) = 1 ( 5 2017 ) = 1. \begin{aligned} \left ( \dfrac{5}{2017} \right ) \left ( \dfrac{2017}{5} \right ) &= (-1)^{(2016)(4)/4} \\ \left ( \dfrac{5}{2017} \right ) \left ( \dfrac{2}{7} \right ) &= 1 \\ -\left ( \dfrac{5}{2017} \right ) &= 1 \\ \left ( \dfrac{5}{2017} \right ) &= -1. \end{aligned}

Thus, a = 5 a = 5 is the smallest value of a a such that ( a 2017 ) = 1 , \left ( \dfrac{a}{2017} \right ) = -1, since ( 4 2017 ) = ( 2 2017 ) 2 = 1. \left ( \dfrac{4}{2017} \right ) = \left ( \dfrac{2}{2017} \right )^2 = 1. If we set d = 4 , d = 4, we find that ( d 2017 ) ( d + 1 2017 ) = ( 4 2017 ) ( 5 2017 ) = 1 , \left ( \dfrac{d}{2017} \right ) \left ( \dfrac{d + 1}{2017} \right ) = \left ( \dfrac{4}{2017} \right ) \left ( \dfrac{5}{2017} \right ) = -1, meaning that there does not exist x x such that x 2 672 d ( d + 1 ) ( m o d 2017 ) . x^2 \equiv 672d(d + 1) \! \pmod{2017}.

Thus, the smallest value of n n such that the sum of n n consecutive perfect squares is not divisible by 2017 is n = 2 ( 4 ) + 1 = 9 . n = 2(4) + 1 = \boxed{9}.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...