1. Joined
    02 Mar '06
    Moves
    17881
    25 Aug '09 23:37
    Originally posted by QuickDrawd4
    It certainly is a problem...

    First we can state the problem as:
    (p-1)!+1 = p^k for some k.

    assume k=1.

    (p-1)!+1=p
    => (p-1)!=p-1

    which has only the trivial solution of p=2.

    Now assume k=2
    (p-1)!+1=p^2

    Primes for which (p-1)!+1 = 0 mod p^2 are called Wilson Primes, only 3 are known:
    5,13 and 563 with no others below 5*10^8
    source: ht ...[text shortened]... with p < 5*10^8.

    It is conjectured however that there are an infinite number of Wilson primes
    i like the analysis... though you did miss the other trivial solution where p=3 🙂

    interesting to note though that (p-1)! = (p-1)(p-2)(p-3)...(3)(2)(1) which is divisible by every prime less than p. but then (p-1)! + 1 is not divisible by ANY primes less than p, and as such must be divisible by p or a prime larger than p, or a product of primes greater than or equal to p. (reminiscent of the proof of the infinitude of the primes)

    by cursory inspection, i believe (p-1)! = -1 mod p but i don't remember the theorem/proof... (is it related to fermat's little theorem?) and as such i think that [(p-1)! + 1] is always a MULTIPLE of p, though this is not what the op was asking 🙂 also i'm too lazy to support this with calculations and incidentally, may be completely wrong!
  2. Joined
    24 Apr '05
    Moves
    3061
    26 Aug '09 05:15
    Originally posted by QuickDrawd4
    It certainly is a problem...

    First we can state the problem as:
    (p-1)!+1 = p^k for some k.

    assume k=1.

    (p-1)!+1=p
    => (p-1)!=p-1

    which has only the trivial solution of p=2.

    Now assume k=2
    (p-1)!+1=p^2

    Primes for which (p-1)!+1 = 0 mod p^2 are called Wilson Primes, only 3 are known:
    5,13 and 563 with no others below 5*10^8
    source: ht ...[text shortened]... with p < 5*10^8.

    It is conjectured however that there are an infinite number of Wilson primes
    (p-1)!+1=p
    => (p-1)!=p-1

    which has only the trivial solution of p=2.


    This is incorrect, which led to your overlooking p=3 as a solution.

    Otherwise, you are basically correct that the only solutions are p=2,3,5.

    That there are no solutions above p=5 can be proven without knowing anything about the subject of Wilson primes (for instance, using proof by contradiction). Which is not to say that it's not still a tricky problem.
  3. Joined
    24 Apr '05
    Moves
    3061
    26 Aug '09 05:201 edit
    Originally posted by Aetherael
    i like the analysis... though you did miss the other trivial solution where p=3 🙂

    interesting to note though that (p-1)! = (p-1)(p-2)(p-3)...(3)(2)(1) which is divisible by every prime less than p. but then (p-1)! + 1 is not divisible by ANY primes less than p, and as such must be divisible by p or a prime larger than p, or a product of primes great lso i'm too lazy to support this with calculations and incidentally, may be completely wrong!
    by cursory inspection, i believe (p-1)! = -1 mod p but i don't remember the theorem/proof... (is it related to fermat's little theorem?)

    Correct, it's Wilson's Theorem. Similar to Fermat's little theorem (but Wilson's is necessary and sufficient for primality, whereas Fermat's isn't).
Back to Top

Cookies help us deliver our Services. By using our Services or clicking I agree, you agree to our use of cookies. Learn More.I Agree