# Arithmetic Problem

Staff Emeritus
Gold Member

## Main Question or Discussion Point

n = (28)^3

which is greater:

the units digit of n

OR

4?

How does one go about *computing* the units digit of n?

the unit's digit is the digit in the one's place on the number.

so 38 has unit digit 8, 386784747 has unit digit of 7, etc...

Staff Emeritus
Gold Member
I know what the units digit is. I don't know how to compute 28^3 in my head, or whether there is some way of determining the units digit of 28^3 without actually computing it.

Staff Emeritus
Gold Member
Edit, actually I do know how to compute 28^3 in my head. With great difficulty, I got 21 952, which turned out to be correct. But I had a lot of trouble remembering my intermediate results. I really don't think this is the point. Surely the question is meant to be answerable without this mental computation.

28 = 7*4

7^3 = 7*49 -> this number has 3 in the unit digit. 4^3 = 4*16 -> this one has a 4. 4*3 = 12, hence 28^3 ends with a 2.

Last edited:
Staff Emeritus
Gold Member
That's the *general strategy*, then? Factor the number.

EDIT: I think arithmetic is my least favourite branch of math.

That's the *general strategy*, then? Factor the number.
There's an even simpler way: the unit digit in 28 is 8, 8^3 = 8*64 - > this ends with a 2. This said, 28^3 ends with a 2.

Werg22: There's an even simpler way: the unit digit in 28 is 8, 8^3 = 8*64 - > this ends with a 2. This said, 28^3 ends with a 2.

We look at this modulo 10, 28==8. On the other hand we can also use 8==-2 Mod 10, so all we have to do is look at (-2)^3=-8==2 Mod 10, and we are done!

This way helps because suppose the problem was (7598)^10. That matter reduces to (-2)^10 = 64 == 4 Mod 10.

Last edited:
matt grime
Homework Helper
Just to explain what is going on to the OP:

any whole number X can be written as 10*Y + Z for some Z in the range 0 to 9, Z being the 'units', as you know.

If you raise (10Y+Z) to any power, the only contribution to the units is from the power of Z.

Robert chose to decompose X with Z in a different range because it made the maths a little easier.

Exercise - find the unit digit of 99 raised to an even power and an odd power.

Staff Emeritus
Gold Member
Okay, modular arithmetic is a subject that, for whatever reason, is missing from my repertoire. So, I had a look at the articles on modular arithmetic at both Wikipedia and MathWorld. I got the basic idea of it, but unfortunately I have no knowledge of number theory or abstract algebra, so once they start spouting off about groups and rings, I'm lost:

Werg22: There's an even simpler way: the unit digit in 28 is 8, 8^3 = 8*64 - > this ends with a 2. This said, 28^3 ends with a 2.
Right, and we need only consider the 8 in 28, for reasons explained by matt grime. This method makes perfect sense to me.

We look at this modulo 10, 28==8. On the other hand we can also use 8==-2 Mod 10, so all we have to do is look at (-2)^3=-8==2 Mod 10, and we are done!
What I don't understand about this method is how it is useful/allowable to express the number as something (mod 10). What I mean is that you express the number as something (mod 10), THEN you perform the operation on it (cubing in this case), then you get a result that you express as something else (mod 10), and somehow that is a valid answer. I don't get it. Something (mod 10) doesn't correspond to a unique integer, but to many different ones. So how do you know you've got the right answer once you start playing around with mod 10?

This way helps because suppose the problem was (7598)^10. That matter reduces to (-2)^10 = 64 == 4 Mod 10.
Doesn't (-2)^10 = 1024 ?

matt grime
Homework Helper
That last sentence indicates you don't understand what 'mod 10' means at all. Try to link the things I said to this.

Staff Emeritus
Gold Member
Umm, so what what about the second last paragraph? Can anyone address the question I was asking?

That last sentence indicates you don't understand what 'mod 10' means at all.
I thought I did. I mean, I understood it well enough to adequately explain the statements made by robert Ihnot:

1. 28 == 8 (mod 10).

Right, well this made sense to me because 28 is 8 above 20, which is two cycles of 10, and in modular arithmetic, if you go through any whole number of cycles of the modulus, you end up right back where you started, i.e. 20 == 0 (mod 10)

2. 8 == -2 (mod 10)

Well this makes sense to me by the same reasoning as above. 8 is 2 less than 10.

3. (-2)^10 = 64

Now THIS is the statement of robert Inhot that I did not understand...it does not make sense to me in ANY form of arithmetic.

3. (-2)^10 = 64

Now THIS is the statement of robert Inhot that I did not understand...it does not make sense to me in ANY form of arithmetic.
I think that was a mistake becaue you would have (-2)^10=1024==4(mod 10)

Staff Emeritus
Gold Member
I think that was a mistake becaue you would have (-2)^10=1024==4(mod 10)
Great! Now that that has been established, can anyone help me out with my question? (post 10).

cepheid: Great! Now that that has been established, can anyone help me out with my question? i.e.: Then you get a result that you express as something else (mod 10), and somehow that is a valid answer. I don't get it. Something (mod 10) doesn't correspond to a unique integer, but to many different ones. So how do you know you've got the right answer once you start playing around with mod 10?

I did make a mistake on that, sorry! Certainly (-2)^10 = 1024, and the last digit is 4, which is what we are looking for.

Now if we have to find last digit of 7598^9, it certainly helps to just consider 8^9 = 134217728 ==8 Mod 10. However for simpliticy of calculation we could use (-2)^9 == -512. Now that is -500 +-10+-2. So dropping the 10 and 100s it gives us -2 Mod 10 ==8 Mod 10.

Now yours is a good question. The answer is the last digit for our purposes is only going to be from 0 to 9 and is not a negative number. So we have -2==8 Mod 10. Using a negative number for calculation was a trick to reduce the difficulity of the calculation. From the standpoint of Modulo arithmetic we are using just a representation Modulo 10. Thus 8 ==28==208, or 8==-2 ==-102==-512 Modulo 10. We could have used any representation we wanted, but obviously -2 is the smallest one.

PS: Is interesting to see 7598^9, what the last two digits are. Suppose we want to carry this modulo 100 to get two digits. (7598)^9==98^9. ==(-2 )^9 Mod 100 ==-512 Mod 100 ==-12 ==100-12 ==88 Mod 100. So the last two digits are both 8.

Last edited:
uart
Great! Now that that has been established, can anyone help me out with my question? (post 10).
Hi cepheid, here's a few really simple exercises you should do to help your understanding of modulo arithmetic. Take the time to work though these and prove them for yourself (they're not difficult) and I guarantee that you will then fully understand all of the methods given above.

a = (a mod n) + k n , for some integer k

2. Prove that with modulo addition that taking modulo of any/all the arguments before adding makes no change to the result. That is,

(a + b) mod n = (a mod n + b mod n) mod n

3. Use the above result to prove that with modulo multiplication that taking modulo of any/all the arguments before multiplying makes no change to the result. That is,

(a b) mod n = ((a mod n) (b mod n)) mod n

4. Use the above result to prove that with modulo exponentiation that taking modulo of the base (not the exponent) before exponentiating makes no change to the result. That is,

(a^b) mod n = ((a mod n)^b) mod n

Hope this helps.

Last edited:
{"ft_lang_label":"__label__en","ft_lang_prob":0.66551995,"math_prob":0.945312,"size":321,"snap":"2019-51-2020-05","text_gpt3_token_len":99,"char_repetition_ratio":0.17665616,"word_repetition_ratio":0.5483871,"special_character_ratio":0.3084112,"punctuation_ratio":0.10294118,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99723965,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-01-28T08:18:03Z\",\"WARC-Record-ID\":\"<urn:uuid:da994b2d-8f8c-4d2a-a321-110d098a8d98>\",\"Content-Length\":\"128773\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:34b0b830-926d-48de-ad2b-0ebc5bfdbe48>\",\"WARC-Concurrent-To\":\"<urn:uuid:a952bad4-5d9c-4eee-a7c3-18adb09735f2>\",\"WARC-IP-Address\":\"23.111.143.85\",\"WARC-Target-URI\":\"https://www.physicsforums.com/threads/arithmetic-problem.182510/\",\"WARC-Payload-Digest\":\"sha1:JY2UCWATWMJ4KFLRLLYV6XS6D3RKCVKM\",\"WARC-Block-Digest\":\"sha1:D63I6UXA4JQDCOXOY3RS7I3YMNFSWEJ3\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-05/CC-MAIN-2020-05_segments_1579251776516.99_warc_CC-MAIN-20200128060946-20200128090946-00388.warc.gz\"}"}