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

Homework Help: Number theory help

  1. Feb 14, 2006 #1
    Could someone please give me some advice on solving these problems

    1. find the last digit of the decimal expansion 7^999999?
    I think i have to do something like 7^999999(mod10) but i'm not really sure if that's right or how i would do that

    2. Show that every positive integer relatively prime to 10 divides infinitely many repunits? I don't know what a repunit is or how i would even begin this problem.

  2. jcsd
  3. Feb 15, 2006 #2


    User Avatar
    Science Advisor
    Homework Helper

    HINT #1: Powers of 7 can only end in one of the digits 7, 9, 3 or 1.
  4. Feb 15, 2006 #3
    Thanks i think i figured the first one out
  5. Feb 15, 2006 #4
    a repunit, according to my quick google search, is a number with all ones in every place. 11. 111. 1111111111 etc. The general formula for them is (10^x-1)(10-1) if you use a different number than 10 you're switching what base you're working in, but I'm assuming this is all in base 10. They have interesting properties, like if you square them you get those numbers that go like 1234321 or whatever, which is neat. Yay for learning

    ...so relatively prime means the two numbers share no common positive factors except 1, so in the case of 10 and other numbers, you get 1, 3, 7, 9, 11, etc.(I think, I looked up relatively prime as well)I can't help you with the proof, but I can see by random example it's true. 11 divides 11, 1111, 111111, and so on(add two ones each time, and the answer is actually like 101010101...another neat property, this is neat, I should take a number theory class)it gets weird though, for like 13 you add on an additional 6 1s(or whatever, I'm just messing with it on my calc)
    Last edited: Feb 15, 2006
  6. Feb 15, 2006 #5
    thanks for your help. I think i might have the proof but i'm not sure does this look right?

    If (a,10)=1 and (a,9)=1 then a|(10^n-1)/9 and if (a,9)=d>1 then d divides every repunit of length k9 and (a/d)|(10^(kΦ(a/d))-1)/9 and this repeats infinetly
  7. Feb 15, 2006 #6


    User Avatar
    Science Advisor
    Homework Helper

    I don't see where you're getting the first part:

    If (a,10)=1 and (a,9)=1 then a|(10^n-1)/9

    You haven't justified it. And what's n? The above fails for a = 7, n = 2. Anyways, what you've written doesn't look like a proof to me.

    Consider the case a = 1. a divides infinitely many repunits, so we're done this case. From here on, a > 1.

    Suppose p is a prime that is neither 2 nor 5. What can you say about 10 as an element of the group of elements {1, ..., p-1} under multiplication modulo p? What is the sum

    (1 + (p-1)) + (2 + (p-2)) + ... + (p/2 - 1/2 + (p/2 + 1/2))

    congruent to (modulo p)? Putting these together and filling in the details, what can you say about the existence of a repunit r such that p | r (again, where p is a prime that is neither 2 nor 5)?

    Try to figure out that if x is any number that divides a repunit, then it divides infinitely many. (Once you prove this, it will be useful in two separate places, one where x = p, and second, where x = a). Prove that if a does not divide a repunit, then (a,10) cannot be 1, otherwise we'd get that

    for all prime p, there exists a repunit r such that (a,r) = 1 but (r,p) = p
    (it's easy to find an r such that (a,r) = 1, but to find an r such that, in addition, (r,p) = p, you need to use the fact you proved, where x = p)


    for all prime p, (a,p) = 1

    which is impossible because a > 1.

    Deduce that if (a,10) = 1, then a divides a repunit. Using x = a and the fact you proved, conclude that a divides infinitely many repunits.
    Last edited: Feb 15, 2006
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook