 |
 |
Author |
 |
Message |
 |
 |
 |
 |
 |
 |
pkothari13
Yang-Mills Theory


Offline Joined: 20 Jun 2004 Posts: 749 Location: Texas
|
Fermat's Theorem
I've seen Fermat's Theorem in many places.. yet I can't quit pinpoint where one could apply it in a math problem... would anyone happen to have any simple problems that use this formula?
and btw, Fermat's Theorem is (or so I think, lol)
If two numbers, a and n are relatively prime, then , where is the number of integers less or equal to n relatively prime to n.
I think that the actual theorem is somewhat different, and the above formula is just like an offshoot of it or something.
|
Posted: Thu Jan 27, 2005 3:19 am |
 |
|
|
 |
 |
 |
 |
 |
 |
 |
Rep123max
Navier-Stokes Equations


Offline Joined: 30 Jun 2003 Posts: 1992 Location: Texas
|
Ya, that is Euler's (I believe) extension of it, the original theorem is where p is prime and a is not a multiple of p.
Some examples I guess would be: What is the remainder when is divided by 17? That is off the top of my head so if it comes out to be a big number, don't blame me!
I'm actually blanking on more thinking type questions, but when I think of some, I'll post em.
|
Posted: Thu Jan 27, 2005 3:26 am |
 |
|
|
 |
 |
 |
 |
 |
 |
 |
towersfreak2006
Birch & Swinnerton Dyer


Offline Joined: 16 Apr 2004 Posts: 2798 Location: College Station, TX or Cambridge, MA
|
Perhaps both of you remember this one?
Reduce to an equivalent polynomial with lowest positive exponents.
|
Posted: Thu Jan 27, 2005 3:50 am |
 |
|
|
 |
 |
 |
 |
 |
 |
 |
pkothari13
Yang-Mills Theory


Offline Joined: 20 Jun 2004 Posts: 749 Location: Texas
|
| Rep123max wrote: |
Ya, that is Euler's (I believe) extension of it, the original theorem is where p is prime and a is not a multiple of p.
Some examples I guess would be: What is the remainder when is divided by 17?
|
So by saying that, you could assume that ??
|
Posted: Thu Jan 27, 2005 3:50 am |
 |
|
|
 |
 |
 |
 |
 |
 |
 |
JBL
Birch & Swinnerton Dyer

Offline Joined: 05 Jul 2003 Posts: 11138 Location: Brooklyn, NY or Cambridge, MA
|
Not "you can assume it" -- by Fermat's Little Theorem, we know that .
Also, Towersfreak, I assume you want x integral, right?
|
_________________ Joel
Hi Deeps! <3
Posted: Thu Jan 27, 2005 3:53 am |
 |
|
|
 |
 |
 |
 |
 |
 |
 |
Rep123max
Navier-Stokes Equations


Offline Joined: 30 Jun 2003 Posts: 1992 Location: Texas
|
Oh ya, I do remember that. ARML packet from Richardson tests (which my current teacher wrote, I wish we did problems like that in class instead of the monotonous problems we do now).
|
Posted: Thu Jan 27, 2005 3:59 am |
 |
|
|
 |
 |
 |
 |
 |
 |
 |
pkothari13
Yang-Mills Theory


Offline Joined: 20 Jun 2004 Posts: 749 Location: Texas
|
I was looking through some old problems and saw the formula could be applied to finding the units or tens or hundreds, etc digit of a number such as 9^357. But.. I'm still kinda lost .
|
Posted: Thu Jan 27, 2005 4:14 am |
 |
|
|
 |
 |
 |
 |
 |
 |
 |
Gyan
Navier-Stokes Equations


Offline Joined: 11 Dec 2003 Posts: 1621 Location: Cincinnati,OH
|
Okay here is an old problem from 1978
if last three digits of is same as the last three digits of find m and n such that m+n is minimum.
(m,n are natural numbers and m is not equal to n that is )
|
Posted: Thu Jan 27, 2005 4:24 am |
 |
|
|
 |
 |
 |
 |
 |
 |
 |
Gyan
Navier-Stokes Equations


Offline Joined: 11 Dec 2003 Posts: 1621 Location: Cincinnati,OH
|
| Quote: |
by Fermat's Little Theorem, we know that
|
That is true if you know that 17 is prime...
But then why go up to 16 , will be 1 (mod 17) . ( Why because
OTOH by the direct calculation you see that = and you can draw a conclusion that 17 is prime.
Strange as it may seem but what one generally does in practice, is to calculate "3^16" to check if it is 1 and learns something about the primality of "17".
For a large number, say "11111111111" it is much easier (calculation wise ... suppose you do not have a calculator/computer) to calculate and see that it is not 1 and draw a conclusion that 11111111111 is not a prime; than testing out 11111111111 by trial divison.
|
Posted: Thu Jan 27, 2005 5:01 am Last edited by Gyan on Thu Jan 27, 2005 5:07 am; edited 2 times in total |
 |
|
|
 |
 |
 |
 |
 |
 |
 |
pkothari13
Yang-Mills Theory


Offline Joined: 20 Jun 2004 Posts: 749 Location: Texas
|
| Gyan wrote: |
Okay here is an old problem from 1978
if last three digits of is same as the last three digits of find m and n such that m+n is minimum.
(m,n are natural numbers and m is not equal to n that is )
|
Well, from looking at the old problem I came across, I saw that the units digit repeats every four because :phi: 5 = 4, the tens digit repeats every twenty because :phi:25 = 20, and :phi:125 = 100, so the hundreds digit repeats every 100. I have no clue why.. I know it has something to do with Euler's/Fermat's formula.. but I can't see the exact thing... so I'm assuming 1978^1 = 1978^101 mod 1000?, so m+n = 1 +101 = 102?
EDIT; yeah sorry that was a typo
|
Posted: Thu Jan 27, 2005 5:04 am Last edited by pkothari13 on Thu Jan 27, 2005 7:33 am; edited 1 time in total |
 |
|
|
 |
 |
 |
 |
 |
 |
 |
JBL
Birch & Swinnerton Dyer

Offline Joined: 05 Jul 2003 Posts: 11138 Location: Brooklyn, NY or Cambridge, MA
|
| Gyan wrote: |
OTOH by the direct calculation you see that = and you can draw a conclusion that 17 is prime.
|
Perhaps we can take turns adding to each other -- we know from this that 17 is not necessarily not prime. It gives us good, but not perfect evidence that 17 could be prime. There are a nasty set of numbers called the Carmichael numbers, which are all composite but have the interesting property that, if you take a Carmichael number and any other integer such that , we have , something that doesn't happen in general for composite integers (although it does for the primes).
|
_________________ Joel
Hi Deeps! <3
Posted: Thu Jan 27, 2005 5:11 am |
 |
|
|
 |
 |
 |
 |
 |
 |
 |
Gyan
Navier-Stokes Equations


Offline Joined: 11 Dec 2003 Posts: 1621 Location: Cincinnati,OH
|
| pkothari13 wrote: |
| Gyan wrote: |
Okay here is an old problem from 1978
if last three digits of is same as the last three digits of find m and n such that m+n is minimum.
(m,n are natural numbers and m is not equal to n that is )
|
Well, from looking at the old problem I came across, I saw that the units digit repeats every four because :phi: 5 = 4, the tens digit repeats every ten because :phi:25 = 10, and :phi:125 = 100, so the hundreds digit repeats every 100. I have no clue why.. I know it has something to do with Euler's/Fermat's formula.. but I can't see the exact thing... so I'm assuming 1978^1 = 1978^101 mod 1000?, so m+n = 1 +101 = 102?
|
May be a typo but phi(25) = 20 and not 10.
Yes phi (125) = 100
The answer (102) I believe is not correct . Have to be careful - two things:
A. 1978 and 1000 are NOT prime to each other (both are even)
B. The digits repeats every 100 ... but may also repeat every, say 5 or 10 or any other factor of 100 .. so 100 may not be the smallest value.
|
Posted: Thu Jan 27, 2005 5:14 am |
 |
|
|
 |
 |
 |
 |
 |
 |
 |
Gyan
Navier-Stokes Equations


Offline Joined: 11 Dec 2003 Posts: 1621 Location: Cincinnati,OH
|
| Quote: |
| It gives us good, but not perfect evidence that 17 could be prime.
|
Well in general that is a very good point , but in *this* case if you know that you would know that 17 is prime. Here , (and in all such cases where (p-1) has no odd factors) this can becomes "if and only if" type condition for proving the primality.
Why ? if 3^8 is -1, so order of 3 has to be 16, and this means 17 is prime.
(IOW phi(17) can not be less than 16 so it is 16 and hence 17 is prime)
But in general - JBL has a very good point, This type of test (except for a few special cases) gives a "good" but not a "perfect" way to test if a number is prime. One well known ( known in ancient times in India - Many old mathematicans seem to know this theorem, or simplified version of this theorem , long before Fermat) example is 341 where 341 is not prime but
But 'reverse' is obviousy true.( if you see that a^(p-1) is not 1 mod p, you can draw the conclusion that p is not prime) .
|
Posted: Thu Jan 27, 2005 5:25 am |
 |
|
|
 |
 |
 |
 |
 |
 |
 |
pkothari13
Yang-Mills Theory


Offline Joined: 20 Jun 2004 Posts: 749 Location: Texas
|
| towersfreak2006 wrote: |
Perhaps both of you remember this one?
Reduce to an equivalent polynomial with lowest positive exponents.
|
is that 3x^3 + 2x^3 + 7x^2 - 2x^2 = 5x^3 + 5x^2
I just assumed that at every 4, the pattern would repeat..
|
Posted: Fri Jan 28, 2005 4:17 am |
 |
|
|
 |
 |
 |
 |
 |
 |
 |
JBL
Birch & Swinnerton Dyer

Offline Joined: 05 Jul 2003 Posts: 11138 Location: Brooklyn, NY or Cambridge, MA
|
hrm? Why every 4?
|
_________________ Joel
Hi Deeps! <3
Posted: Fri Jan 28, 2005 6:34 am |
 |
|
|
 |
 |
 |
 |
 |
 |
 |
Elemennop
Navier-Stokes Equations


Offline Joined: 27 Aug 2004 Posts: 1461
|
The original theorem (Euler's phi theorem) is used (or at least I use) very often for problems asking to find the last x digits of an enormous number.
Ex. What is the last two digits of 3^843?

|
Posted: Fri Jan 28, 2005 6:35 am |
 |
|
|
 |
 |
 |
 |
 |
 |
 |
TripleM
Navier-Stokes Equations

Offline Joined: 27 May 2003 Posts: 1577 Location: New Zealand
|
| pkothari13 wrote: |
| towersfreak2006 wrote: |
Perhaps both of you remember this one?
Reduce to an equivalent polynomial with lowest positive exponents.
|
is that 3x^3 + 2x^3 + 7x^2 - 2x^2 = 5x^3 + 5x^2
I just assumed that at every 4, the pattern would repeat..
|
Test that with an example: which isn't one more than a multiple of 7. So it doesn't repeat every 4.
Since 7 is a prime.. Fermats little theorem tells you instantly that it will repeat .. how many times?
|
_________________ Stephen
Posted: Fri Jan 28, 2005 7:36 am |
 |
|
|
 |
 |
 |
 |
 |
 |
 |
NightFlarer
Riemann Hypothesis


Offline Joined: 07 Jun 2004 Posts: 320 Location: Exeter, NH
|
so since a^(p-1) = 1 (mod p), we have a^6 = 1 (mod 7)
in this case we have x not a, so for 3x^23 we have
3((x^6)^3 * x^5)
3(1*x^5)
3(x^5)
then we have 2x^19, which is just 2x
next is 7x^14, isn't this 0 mod 7 anyway because of the 7? can't we just get rid of it? anyway, doing the same as before we would have 7x^2
lastly, -2x^6 = -2
so we have
3x^5 + 2x + 7x^2 -2 (mod 7)
I hope this is right
actually...couldn't we say 3x^5 = 3x^6 * x^-1?
because then we have 3/x...
so I guess it's 3/x + 2x + 7x^2 -2 (mod 7) or 7x^2 + 2x + 3/x -2 (mod 7)
And as for you mister pkothari, you need to pick it up! You weren't featured in that magazine for nothing! (Perhaps you remember me from the Dulles competition a month or two ago...) Just kidding, of course
|
Posted: Sat Jan 29, 2005 1:23 am |
 |
|
|
 |
 |
 |
 |
 |
 |
 |
JBL
Birch & Swinnerton Dyer

Offline Joined: 05 Jul 2003 Posts: 11138 Location: Brooklyn, NY or Cambridge, MA
|
Good work, but one problem: your next-to-last step (with the x^6 term) is not absolutely true: x^6 = 1 (mod 7) only when x is not divisible by 7. This is why I prefer a different statement of Fermat's Little Theorem: for all primes p and integers a.
|
_________________ Joel
Hi Deeps! <3
Posted: Sat Jan 29, 2005 4:06 am |
 |
|
|
 |
 |
 |
 |
|
 |
 |