Compute the last digit of 2^2004

1. Jan 12, 2005

danne89

Grettings! I've seen this on many competetions. You would need to use some logarithms, I've figured out. But then... Modula (or what is it, you know %). But I can't use it, and when I browsed mathweb, they babbeled something about rings. Maybe I need to check that out first. I donno.

2. Jan 12, 2005

dextercioby

What is your question??The one from the title?If so,the answer is not hard to get,and got forbid,it doesn't involve any logarithms.
Without getting too technical (the answer involves "modulo 4"),try to get a pattern for finding the last rot of the natural powers of 2.Try for the first ones.

A powerful software could give you the answer.The number doesn't have more than 700 digits...

Daniel.

Last edited: Jan 12, 2005
3. Jan 12, 2005

arildno

Note that we can find the folllowing pattern for the last digit:
$$2^{1}=2\to2$$
$$2^{2}=4\to4$$
$$2^{3}=8\to8$$
$$2^{4}=16\to6$$

$$2^{5}=32\to2$$
$$2^{6}=64\to4$$
And so on.
That is every fourth number will have the same ending digit.
Does that give you an idea as how to solve this?

4. Jan 12, 2005

danne89

Surely, just divide with the period.

Edit: No, I'm still stuck. :(

Last edited: Jan 12, 2005
5. Jan 12, 2005

dextercioby

Mathematicians like to say that 4=0(modulo 4).In your case,2004 divided by four gives the rest "0".But it's just like giving the rest 4,since u divided by 4.Therefore,draw the conclusion.

Daniel.

6. Jan 12, 2005

BobG

Try this. Multiply 2 times 2. That gives you 4. Multiply 4 times 2. That gives you eight. Multiply 8 times 2. The last digit is 6. Multiply that by 2 (once again, only worrying about the last digit).

How long until the sequence repeats itself (is this what they meant by 'rings'?). In this case, you have 4 members - 2, 4, 8, 6.

Number each member. 2 is 1. 4 is 2. 8 is 3. 6 is 0.

Modulo divide your exponent by the number of members in your ring. In this case, by 4. You only worry about the remainder. The remainder in this case is 0, so the number ends in a 6.

You can do this with other numbers, as well.

7. Jan 12, 2005

danne89

How did you ordered them?

Last edited: Jan 12, 2005
8. Jan 12, 2005

dextercioby

Well done... :tongue2: With a little bit of red wine...

In the order given by consecutive ascending of natural powers of 2.

Daniel.

9. Jan 12, 2005

danne89

Thanks. I got it.

10. Jan 12, 2005

Tom McCurdy

Take the 2^n
divide n by 4
if you get remandier of
one it is 2
two it is four
three it is eight
none it is 6

I believe

quick test

2^9=
9/4 = 2 R of 1 which would make last digit a two
2^9= 512