# Thread: Square numbers problem solving

1. ## Square numbers problem solving

Hello MHF,
Which of the following cannot be the last digit of the sum of the squares of seven consecutive numbers?
A: 3
B:5
C:6
D:7
E:8
I have no idea where to begin or what to do, i tried using the squares of 1-7
but obviously that wouldn't give me an answer (hopeless thing to do)
Any help appreciated.

2. Wow. I don't know any fancy way to do this but I would just go up the list until I was able to rule out four of the five numbers. Start with 4 + 9 + 16 +25 + 36 + 49 + 64 then go from there.

3. Originally Posted by 99.95
Hello MHF,
Which of the following cannot be the last digit of the sum of the squares of seven consecutive numbers?
A: 3
B:5
C:6
D:7
E:8
I have no idea where to begin or what to do, i tried using the squares of 1-7
but obviously that wouldn't give me an answer (hopeless thing to do)
Any help appreciated.
I can only offer a trial and error method:

Consider the last digit of a number and the last digit of it's square:

$\displaystyle \begin{array}{c|c}\text{last digit of number}& \text{last digit of square}\\ \hline\\0&0\\9 \ or\ 1&1 \\8\ or\ 2&4\\7\ or\ 3&9\\6\ or\ 4&6\\5&5\\ \hline\end{array}$

If you add the squares of numbers with end digits 0 to 6 you'll get 31 that means the end digit 1;
if you add the squares of numbers with end digits 1 to 7 you'll get 40 that means the end digit 0;
if you add the squares of numbers with end digits 2 to 8 you'll get 43 that means the end digit 3;
if you add the squares of numbers with end digits 3 to 9 you'll get 40 that means the end digit 0;

and so on...

Compare your results with the given answers (and then pick the right one!)

If I didn't make a mistake the answer is D.

4. Hello, 99.95!

Which of the following cannot be the last digit
of the sum of the squares of seven consecutive numbers?

. . $\displaystyle (A)\;3\qquad (B)\;5 \qquad (C)\;6\qquad (D)\;7 \qquad (E)\;8$
Note the last digit of all squares.

. . . . $\displaystyle \begin{array}{c} 0^2 \to 0 \\ 1^2 \to 1 \\ 2^2 \to 4 \\ 3^2 \to 9 \\ 4^2 \to 6 \end{array}\qquad \begin{array}{c}5^2 \to 5 \\ 6^2 \to 6 \\ 7^2 \to 9 \\ 8^2 \to 4 \\ 9^2 \to 1 \end{array}$

We see that squares cannot end in 2, 3, 7, or 8.

Let the 7 consecutive numbers be: .$\displaystyle x-3,\;x-2,\;x-1,\;x,\;x+1,\;x+2,\;x+3$

Then we have:

. . $\displaystyle \begin{array}{ccc} (x-3)^2 &=& x^2 - 6x + 9 \\ (x-2)^2 &=& x^2-4x+4 \\ (x-1)^2 &=& x^2-2x + 1 \\ x^2 &=& x^2\qquad\qquad \\ (x+1)^2 &=& x^2 + 2x + 1 \\ (x+2)^2 &=& x^2 + 4x + 4 \\ (x+3)^2 &=& x^2 + 6x + 9 \\ \hline \text{Sum} &=& 7x^2 + 28\end{array}$

Suppose the sum $\displaystyle 7(x^2+4)$ ends in 7.

. . Then $\displaystyle x^2+4$ must end in 1.

. . And $\displaystyle x^2$ must end in 7.

But no square ends in 7.

Answer: .$\displaystyle (D)\;7$

5. Originally Posted by 99.95
Hello MHF,
Which of the following cannot be the last digit of the sum of the squares of seven consecutive numbers?
A: 3
B:5
C:6
D:7
E:8
I have no idea where to begin or what to do, i tried using the squares of 1-7
but obviously that wouldn't give me an answer (hopeless thing to do)
Any help appreciated.
Here is another approach. Let

$\displaystyle s(n) = 1^2 + 2^2 + 3^2 + \dots + n^2$
$\displaystyle = (1/6)\; n (n+1) (2n+1)$
(a well-known identity).

Then the sum of the squares of the 7 consecutive integers ending in n is
$\displaystyle s(n) - s(n-7) = (1/6) \; [ n (n+1) (2n+1) - (n-7)(n-6)(2n-13)] = 7 \; (n^2 - 6n + 13)$

Evaluating $\displaystyle 7\; (n^2 - 6n + 13)$ for n = 0, 1, 2, ..., 9 modulo 10 will then reveal the possibilities for the last digit of the sum.

 Soroban posted his answer while I was composing this-- essentially the same approach? Or maybe not.[/edit]

6. Thanks guys both methods (although similiar) are definately useful and yes the answer is "D" (7). May I ask how you guys go about solving these, is it just some logical approach you take?
Thanks again
By the way, does modulo = remainder?
Eg: 10/4= 2 r 2 or 2 mod (2) ?

7. Yes, "Modulo 10" means divide by 10 and keep the remainder, i.e., the last digit.

As for how I do it, I just have lots of experience solving problems, and I am sure Soroban has more experience than I.