Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Compute the last digit of 2^2004

  1. Jan 12, 2005 #1
    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. jcsd
  3. Jan 12, 2005 #2

    dextercioby

    User Avatar
    Science Advisor
    Homework Helper

    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
  4. Jan 12, 2005 #3

    arildno

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed

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

    [tex]2^{5}=32\to2[/tex]
    [tex]2^{6}=64\to4[/tex]
    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?
     
  5. Jan 12, 2005 #4
    Surely, just divide with the period.

    Edit: No, I'm still stuck. :(
     
    Last edited: Jan 12, 2005
  6. Jan 12, 2005 #5

    dextercioby

    User Avatar
    Science Advisor
    Homework Helper

    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.
     
  7. Jan 12, 2005 #6

    BobG

    User Avatar
    Science Advisor
    Homework Helper

    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.
     
  8. Jan 12, 2005 #7
    How did you ordered them?
     
    Last edited: Jan 12, 2005
  9. Jan 12, 2005 #8

    dextercioby

    User Avatar
    Science Advisor
    Homework Helper

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

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

    Daniel.
     
  10. Jan 12, 2005 #9
    Thanks. I got it.
     
  11. Jan 12, 2005 #10
    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
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Compute the last digit of 2^2004
  1. Mth digit of 2^n (Replies: 10)

Loading...