Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Is there a base-4 prime repunit for n > 2?

Consider (4^n - 1)/3. For n= 1, 2, 3, … this is 1, 5, 21, …. Written base 4 this is 1, 11, 111, … i.e. the n-repunit base 4. Are all the members of this sequence n > 2 composite, or is there n such that (4^n - 1)/3 is prime? If so, in either case, why? It is easy to show that for n even the result must be composite (it is divisible by 5), but for odd n I'm stuck.

I'm sure this is embarrassingly trivial.

4 Answers

Relevance
  • Anonymous
    1 decade ago
    Favorite Answer

    Surely it is easy, as you suspected, to prove that (1/3)(4^n - 1) is composite for all odd n >= 3.

    Let n = 2p + 1 with p >= 1.

    (1/3)(4^(2p + 1) - 1) = (1/3)(2^(4p + 2) - 1) = (1/3)[2^(2p + 1) - 1]*[2^(2p + 1) + 1]

    Now it is easy to prove that one or other of the final brackets is divisible by 3 (do you want this proof?) and that leaves the product of a pair of integers both greater than 1 so the result is not prime.

  • 1 decade ago

    ALWAYS COMPOSITE (provided n > 2)

    [second added note]

    Just factor 4^n - 1.

    a_n = (4^n - 1) / 3 = (2^2n - 1) / 3 =

    (2^n + 1)(2^n - 1) / 3

    For n > 2 the above shows a_n will have 2 factors both > 1,

    so it is always composite.

    Note however that a_2 = 5 is indeed prime.

    =====================================

    a_n is composite for any composite n -

    a_n is represented as a string of n ones (base 4). Just group the 1's into groups of k, where k is any factor of n. Then it's clear that a_n is a multiple of 111..11 (k ones, base 4).

    Therefore if any a_n is prime, it is for prime n.

    =====================================

    Added later:

    My number theory is weak, but I couldn't help playing around

    with it. For what it's worth, I got this result.

    For any prime p > 2, a corollary to Fermat's Little Theorem

    gives 4^p = 4 (mod p) where "=" means congruent here.

    Then 4^p -1 = 3 (mod p)

    hence (4^p -1) / 3 = 1 (mod p)

    which may be interesting, but this says nothing about whether (4^p - 1)/3 is prime.

  • 1 decade ago

    We can narrow down the list of potential numbers a little.

    As you note, every other number, the ones corresponding to n being even, are divisible by 5.

    At n = 3 we have 21, which is divisible by 3. Since the pattern follows like this:

    a_(n+1) = 4*a_n + 5

    If we apply this pattern to itself we get results like

    a_(n+2) = 4*[4*a_n + 5] + 5 = 16*a_n + 25

    a_(n+3) = 4*[16*a_n + 25] + 5 = 64*a_n + 125

    etc.

    If you do this 6 times, then you will find that

    a_(n+6) = 4096*a_n + 6825. [note that 6825 is divisible by 3]

    --> If a_n is divisible by 3, as is the case with n = 2 --> 21, then every 6th number in the sequence is also divisible by 3. Saying "every 6th number" is the same as saying "when n = an odd multiple of 3". This lets us rule out more number.

    The result will be composite when n is even or for odd multiple of 3. When n is an even multiple of three then the result is also divisible by 5, as noted.

    No, not a proof, but a way to further limit the options of n that might make the repunit prime. So far, every one I have checked have been composite, even when n is a prime number.

  • 1 decade ago

    5 = (4^2-1)/3 is the only one. Look at the bottom section of the link.

    Your last line was a good guess =)

Still have questions? Get your answers by asking now.