PDA

View Full Version : Remainder


Acedeal
November 11th, 2003, 16:28
If 'p' be a prime, then what is the remainder when (p - 1)! is divided by p?

-=DoW=- Baseball
November 11th, 2003, 18:23
i think it's 0

Panda
November 11th, 2003, 20:17
I'm positive the remainder is p-1. But I sort of divined that answer, so I'm working on coming up with a mathematical proof.

-=DoW=- SmokieRat
November 11th, 2003, 20:19
an odd number

Panda
November 11th, 2003, 20:57
Hehe, I came up with a proof, but I think I'll spare you guys from it.

I had to use a bit of congruences and Wilson's Theorem if any of you are curious because this is essentially a restatement of Wilson's Theorem.. But, yes, the answer is definitely p-1.

If any of you want a hint, though, here's Wilson's Theorem. You should be able to deduce the rest from that.

An integer p>1 is prime if and only if
(p-1)! = -1(mod p)

If you go through the proof of this you'll find that the remainder is p-1.
I was playing around with other possiblities and am finding some very interesting patterns. Probably nothing, but it's all very fun stuff.

-=DoW=- JBDiamonds
November 12th, 2003, 03:31
(p-1) divided by p = -1 answer = -1

-=DoW=- The Fan
November 12th, 2003, 03:52
Wilson’s Theorem states that if p is a prime number, (p – 1)!/p will always leave a remainder of p – 1.

For example, let p be the prime number 5. Then (5 – 1)!/5 = some number with a remainder of 5 – 1.

Doing the math, we get 4!/5 which is 24/5 = 4 with a remainder of 5 – 1, which is 4.

Let’s try the prime number 11. (11- 1)!/11 should give us a remainder of 10.

(11 – 1)!/11 = 10!/11 = 3,628,800/11 = 329890 with a remainder of 10.


That means that JB and Panda are right

-=DoW=- Deze
November 12th, 2003, 04:11
I am very sure the answer is: More beer! :D

Panda
November 12th, 2003, 16:00
Give us more problems like this Ace. They were good stuff. :mrgreen:

Gandiman
November 12th, 2003, 16:58
I failed that corse :) But I like More BEER please :banger:

-=DoW=- SmokieRat
November 12th, 2003, 17:02
If I drank it I'd hafta go with Beer as the answer. But since I don't I'll hafta go with RootBeer then.