Bunuel
If n is a positive integer, is \((1^2+2^2+…..+n^2) - (1+2+……+n)\) divisible by 8?
(1) n is an odd number
(2) \(14 < n < 17\)
Sum of squares of first n positive integer = \(\frac{n(n+1)(2n+1)}{6}\)
Sum of first n positive integer = \(\frac{n(n+1)}{2}\)
\((1^2+2^2+…..+n^2) - (1+2+……+n)\)=\(\frac{n(n+1)(2n+1)}{6}\)-\(\frac{n(n+1)}{2}\)
\(\frac{n(n+1)}{2}(\frac{2n+1}{3}-1)\)=\(\frac{n(n+1)}{2}(\frac{2n-2}{3})\)
\(\frac{n(n+1)}{2}*2(\frac{n-1}{3})\)=\frac{(n-1)n(n+1)}{3}
Now, (n-1)n(n+1) is product of three consecutive integers.
a) If n is even, n has to be a multiple of 8 for the entire expression to be multiple of 8.
b) If n is odd, n-1 and n+1 will be even and surely a multiple of 2*4 as one of the two will be a multiple of 4 at least. So, the entire expression will be multiple of 8.
(1) n is an odd number
Case (b) above.
Sufficient
(2) \(14 < n < 17\)
So, possible values
15: Odd number, so case (b) above. The entire expression will be multiple of 8.
16: Even number and multiple of 8, so case (a) above. The entire expression will be multiple of 8.
Sufficient
D