# Number theory quick calculation problem

1. Jun 12, 2016

### late347

1. The problem statement, all variables and given/known data
You may use pen-and-paper and mental calculation. You have 6 minutes time.
Give final digit of

$$(22)^3 ~+ (33)^3~ +(44)^3~+(55)^3~ +(66)^3~+(77)^3$$

2. Relevant equations
3. The attempt at a solution

I'm not terribly good at mental arithmetic myself. I was never particularly good, probably I am slightly below average or even worse. It's difficult to keep track of the partial results.

1.) Well, to me at first it looked like one could attempt to make the partial sums into the form of
$(20+2)^3$ Separate the one's place, from the ten's place.
If you manage to remember what the binomial cube formula is (I think it's like... Newton's binomial formula in English). One could calculate mentally then what would become of those cubed sums (20+2)^3.
Then one could calculate the final sum and get the final digit.

2.)Calculating with pen-and-paper multiplications and then addition would probably be too slow.
Such as 22x22 = 484,
484x22 =10648

3.) Now that I think about it, another way to calculate would be.
$(22)^3=~9680+~968$
$(22)^3= (20+2)*(20+2)*(20+2)$
$(20+2)*(20+2)*(20+2) = 484* (20+2) = (480+4)*(20+2)$
$(480+4)*(20+2) = 9600 +960 +80 +8$
$8= 2^3$
I'm starting to think that because of this kind of calculation as I performed in the third attempt... It seems as though only the one's place matters.
Is the problem so simple as to calculate
$~ 2^3 ~+3^3~+4^3~+5^3~+6^3~+7^3$
$= 8+27+64+125+216+343 = 783$

final digit = 3

double-checking with a real calculator the actual final digit will be 3 (in the original form calculation) I'm just not sure of my own reasoning it seems...

2. Jun 12, 2016

### Math_QED

Well I did it in less than 6 minuts, but I don't think I did it the way you want to know.

22^3 + 33^3 + 44^3 + 55^3 + 66^3 + 77^3
= 11^3(2^3 + 3^3 + 4^3 + 5^3 + 6^3 + 7^3)
= 11^2* 11 * 783 (the 783 took 3 minuts)
= 1331* 783
= (1330 + 1)*783
= 1330*783 + 783
=> last digit is 3 because the first term last number is zero

EDIT: I remember there was a formula for the sum of cubes, ∑i^3. If you know this formula, this problem is trivial.

Last edited: Jun 12, 2016
3. Jun 12, 2016

### late347

How did you know those factors inside the brackets?

I know of course that 22^3 is a big number.

11^3 is a smaller number by a lot...

Did you actually divide (22^3) ÷ (11^3) mentally or what? What did you do there?

4. Jun 12, 2016

### Nidum

Edit/

5. Jun 12, 2016

### Staff: Mentor

What does $22^3$ mean written in primes?

6. Jun 12, 2016

### Math_QED

This is what I did

7. Jun 12, 2016

### Staff: Mentor

Edited to fix my mistake, where I write 243 when it should be 343.
I didn't even go this far.
I got $(8 + 27 + 64 + 125 + 216 + 343)11^3$
For the factor in parentheses, I just added the 1's digits to get 3. For the 113 factor, the 1's digit is 1, so the 1's digit in the answer is 3.

I don't see any advantage in writing 113 as 112 * 11.

Last edited: Jun 12, 2016
8. Jun 12, 2016

### late347

how long this phase took for you? mentally or with pen and paper. I don't think I'm so good at factorizing those numbers...

the sum of the cubes inside the brackets is the fast part to calculate in my opinion. Problems like this make me feel dumb because it seems like an easy thing to find the final digit.

I understood of course, how you proved that the final digit is three.

I just did not see how you knew so easily and fast that $(7^3) * 11^3 = (77)^3$
how did you get so fast that it was 73 for the factor

I must be a little bit rusty

9. Jun 12, 2016

### late347

It does not affect the final digit, but I presume that this is a typo.

7^3 = 343

7^3 ≠ 243

10. Jun 12, 2016

### Staff: Mentor

No, not a typo, just a mistake on my part. I have edited my earlier post.

11. Jun 12, 2016

### late347

I was thinking about the factorization because of Math_QED's post
1.)choose common factor for those cubes $11^3$ - fair enough
2.) $(22)^3 = 22~x~22~x~22 = 2*2*2*11*11*11$
3.) $\frac{2^3 * 11^3}{11^3}$

4.) {2^3 * 11^3 } / { 11^3 }= 2^3
5.) $2^3~x~11^3= 22^3$

12. Jun 12, 2016

### Staff: Mentor

Yes, and if you are used to handle numbers, you see it at once that $11^3$ is a common factor which can be put outside by the distributive law. In addition one usually simply knows the first potentials of small numbers. This all together makes it easy. But one has to exercise it to know such things without actually calculating something. The more calculations you do in mind the easier it gets.

13. Jun 12, 2016

All it wants is the final digit. $(a+b)^3=a^3+3a^2b+3ab^2+b^3$. The only thing that will affect the final digit is the final digit of b^3. ($22^3=(20+2)^3$ last digit is 8 for $22^3$), etc.$3^3$ has last digit 7. $4^3$ it's a 4. etc. Just add the last digits. 8+7+4+5+6+3=33 ==>> last digit is 3. (When computing $77^3$, all you need to compute is $7^3$ and you don't even need the exact answer=you only need the final digit==>>$7^2 =49$, 9*7=63==>> final digit is 3 for $77^3$).

Last edited: Jun 12, 2016
14. Jun 12, 2016

The formula for the sum of the first n cubes is $((n+1)^2 n^2)/4$. $( (7+1)^2 7^2)/4=784$ and then subtract $1^3$. If pressed for time, I do recommend the method I used in post #13-it takes about 30 seconds or less.

15. Jun 12, 2016

### SammyS

Staff Emeritus
As we see, there are many ways to do this.
Once you get that far you might use $\ a^3+b^3=(a+b)(a^2+ab+b^2)\$.
(Edit): Corrected to $\ a^3+b^3=(a+b)(a^2-ab+b^2)\ .\$ Thanks to Charles Link!​

So $\ 3^3+7^3=(3+7)\cdot(\text{whatever})\,,\$ is a multiple of 10.

Similar result for $\ 4^3+6^3\ .$

Then 5 to any positive integer is congruent to 5 mod 10 .

Just add 5 to $\ 2^3\ .$

Last edited: Jun 12, 2016
16. Jun 12, 2016

### late347

damn now I just feel dumb because I remember having had an inkling about how to do this problem for real...

I was assessing whether I was required to actually calculate the entire sum in order to get the final digit...

or whether I could somehow faster calculate only the final digit. I think I tried to calculate the entire result and ran out of time probably... It was an old exam question.

17. Jun 12, 2016

Very clever. One minor correction: $a^3+b^3=(a+b)(a^2-ab+b^2)$. The method still works.

18. Jun 18, 2016

### kyphysics

Was this a high school pre-calculus math problem? Or, was it college?

I don't remember anything like this in HS.

19. Jun 18, 2016

### SteamKing

Staff Emeritus
773 = (7 * 11)^3 = 73 * 113

(a ⋅ b)n = an ⋅ bn

This is why they teach you about things the like factoring products and the laws of exponents.

20. Jun 18, 2016

### late347

It was based on high school knowledge.

Number theory is often taught both as part of pre-calculus areas of mathematics...

An number theory is also post-calculus.

I realized the factoring after I translated the exponentts into multiplication.

I also understood math_qed's solution

I think for this problem I would probably not do modulo calculations because calculator was banned.

This question was inside an old exam.
6 minutes time limit was recommended by me because this question was only one of those many questions.