MathLinks Forum LaTeX Help AoPS Classes Books Classroom MathLinks Contest Math Resources
The time now is Tue Feb 09, 2010 6:55 pm
All times are UTC + 2
View posts since last visit
View unanswered posts
View previous topicView next topic
19 Posts • Page 1 of 1
Author Message
pkothari13
Yang-Mills Theory
Yang-Mills Theory


Offline
Joined: 20 Jun 2004
Posts: 749
Location: Texas

To rate posts you must be logged in
#1
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 a^{\phi (n)} \equiv 1 \pmod{n}, where \phi (n) 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.
_________________
-PK

http://www.mathlinks.ro/weblog.php?w=387

PostPosted: Thu Jan 27, 2005 3:19 am
Rep123max
Navier-Stokes Equations
Navier-Stokes Equations


Offline
Joined: 30 Jun 2003
Posts: 1992
Location: Texas
United States

To rate posts you must be logged in
#2
Ya, that is Euler's (I believe) extension of it, the original theorem is a^{p-1}\equiv 1\mod p where p is prime and a is not a multiple of p.

Some examples I guess would be: What is the remainder when 9^{357} 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.

PostPosted: Thu Jan 27, 2005 3:26 am
towersfreak2006
Birch & Swinnerton Dyer
Birch & Swinnerton Dyer


Offline
Joined: 16 Apr 2004
Posts: 2798
Location: College Station, TX or Cambridge, MA
United States

To rate posts you must be logged in
#3
Perhaps both of you remember this one?

Reduce 3x^{23}+2x^{19}+7x^{14}-2x^6 (\bmod{7}) to an equivalent polynomial with lowest positive exponents.

PostPosted: Thu Jan 27, 2005 3:50 am
pkothari13
Yang-Mills Theory
Yang-Mills Theory


Offline
Joined: 20 Jun 2004
Posts: 749
Location: Texas

To rate posts you must be logged in
#4
Rep123max wrote:
Ya, that is Euler's (I believe) extension of it, the original theorem is a^{p-1}\equiv 1\mod p where p is prime and a is not a multiple of p.

Some examples I guess would be: What is the remainder when 9^{357} is divided by 17?


So by saying that, you could assume that \displaystyle 9^{16}\equiv 1 \pmod{17}??
_________________
-PK

http://www.mathlinks.ro/weblog.php?w=387

PostPosted: Thu Jan 27, 2005 3:50 am
JBL
Birch & Swinnerton Dyer
Birch & Swinnerton Dyer

Offline
Joined: 05 Jul 2003
Posts: 11138
Location: Brooklyn, NY or Cambridge, MA
United States

To rate posts you must be logged in
#5
Not "you can assume it" -- by Fermat's Little Theorem, we know that 9^{16}\equiv 1\mod 17.

Also, Towersfreak, I assume you want x integral, right?
_________________
Joel
Hi Deeps! <3

PostPosted: Thu Jan 27, 2005 3:53 am
Rep123max
Navier-Stokes Equations
Navier-Stokes Equations


Offline
Joined: 30 Jun 2003
Posts: 1992
Location: Texas
United States

To rate posts you must be logged in
#6
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).

PostPosted: Thu Jan 27, 2005 3:59 am
pkothari13
Yang-Mills Theory
Yang-Mills Theory


Offline
Joined: 20 Jun 2004
Posts: 749
Location: Texas

To rate posts you must be logged in
#7
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 Confused .
_________________
-PK

http://www.mathlinks.ro/weblog.php?w=387

PostPosted: Thu Jan 27, 2005 4:14 am
Gyan
Navier-Stokes Equations
Navier-Stokes Equations


Offline
Joined: 11 Dec 2003
Posts: 1621
Location: Cincinnati,OH
United States

To rate posts you must be logged in
#8
Okay here is an old problem from 1978
if last three digits of 1978^n is same as the last three digits of 1978^m find m and n such that m+n is minimum.
(m,n are natural numbers and m is not equal to n that is 0<m<n )

PostPosted: Thu Jan 27, 2005 4:24 am
Gyan
Navier-Stokes Equations
Navier-Stokes Equations


Offline
Joined: 11 Dec 2003
Posts: 1621
Location: Cincinnati,OH
United States

To rate posts you must be logged in
#9
Quote:
by Fermat's Little Theorem, we know that 9^{16}\equiv 1\mod 17


That is true if you know that 17 is prime...Smile
But then why go up to 16 , 9^8 will be 1 (mod 17) . ( Why because 9^8 = 3^{16} Smile

OTOH by the direct calculation you see that 9^4 = 3^8   \equiv -1\mod 17 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 2^{11111111110} and see that it is not 1 and draw a conclusion that 11111111111 is not a prime; than testing out 11111111111 by trial divison.

PostPosted: 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
Yang-Mills Theory


Offline
Joined: 20 Jun 2004
Posts: 749
Location: Texas

To rate posts you must be logged in
#10
Gyan wrote:
Okay here is an old problem from 1978
if last three digits of 1978^n is same as the last three digits of 1978^m find m and n such that m+n is minimum.
(m,n are natural numbers and m is not equal to n that is 0<m<n )


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
_________________
-PK

http://www.mathlinks.ro/weblog.php?w=387

PostPosted: 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
Birch & Swinnerton Dyer

Offline
Joined: 05 Jul 2003
Posts: 11138
Location: Brooklyn, NY or Cambridge, MA
United States

To rate posts you must be logged in
#11
Gyan wrote:
OTOH by the direct calculation you see that 9^4 = 3^8   \equiv -1\mod 17 and you can draw a conclusion that 17 is prime.


Perhaps we can take turns adding to each other Smile -- 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 c and any other integer n such that \gcd(n,c) = 1, we have n^{c-1}\equiv 1\mod c, something that doesn't happen in general for composite integers (although it does for the primes).
_________________
Joel
Hi Deeps! <3

PostPosted: Thu Jan 27, 2005 5:11 am
Gyan
Navier-Stokes Equations
Navier-Stokes Equations


Offline
Joined: 11 Dec 2003
Posts: 1621
Location: Cincinnati,OH
United States

To rate posts you must be logged in
#12
pkothari13 wrote:
Gyan wrote:
Okay here is an old problem from 1978
if last three digits of 1978^n is same as the last three digits of 1978^m find m and n such that m+n is minimum.
(m,n are natural numbers and m is not equal to n that is 0<m<n )


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.

PostPosted: Thu Jan 27, 2005 5:14 am
Gyan
Navier-Stokes Equations
Navier-Stokes Equations


Offline
Joined: 11 Dec 2003
Posts: 1621
Location: Cincinnati,OH
United States

To rate posts you must be logged in
#13
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 3^8 \equiv  -1\pmod {17} 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. Smile
(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 2^{340} \equiv 1 \mod 341

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) .

PostPosted: Thu Jan 27, 2005 5:25 am
pkothari13
Yang-Mills Theory
Yang-Mills Theory


Offline
Joined: 20 Jun 2004
Posts: 749
Location: Texas

To rate posts you must be logged in
#14
towersfreak2006 wrote:
Perhaps both of you remember this one?

Reduce 3x^{23}+2x^{19}+7x^{14}-2x^6 (\bmod{7}) 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..
_________________
-PK

http://www.mathlinks.ro/weblog.php?w=387

PostPosted: Fri Jan 28, 2005 4:17 am
JBL
Birch & Swinnerton Dyer
Birch & Swinnerton Dyer

Offline
Joined: 05 Jul 2003
Posts: 11138
Location: Brooklyn, NY or Cambridge, MA
United States

To rate posts you must be logged in
#15
hrm? Why every 4?
_________________
Joel
Hi Deeps! <3

PostPosted: Fri Jan 28, 2005 6:34 am
Elemennop
Navier-Stokes Equations
Navier-Stokes Equations


Offline
Joined: 27 Aug 2004
Posts: 1461

To rate posts you must be logged in
#16
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?

a^{\phi n}\equiv 1\pmod{n}
3^{40}\equiv 1\pmod{100}
3^{840}\equiv 1\pmod{100}
3^{843}\equiv 27\pmod{100}

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

Offline
Joined: 27 May 2003
Posts: 1577
Location: New Zealand

To rate posts you must be logged in
#17
pkothari13 wrote:
towersfreak2006 wrote:
Perhaps both of you remember this one?

Reduce 3x^{23}+2x^{19}+7x^{14}-2x^6 (\bmod{7}) 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: 2^4 = 16 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

PostPosted: Fri Jan 28, 2005 7:36 am
NightFlarer
Riemann Hypothesis
Riemann Hypothesis


Offline
Joined: 07 Jun 2004
Posts: 320
Location: Exeter, NH
United States

To rate posts you must be logged in
#18
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

PostPosted: Sat Jan 29, 2005 1:23 am
JBL
Birch & Swinnerton Dyer
Birch & Swinnerton Dyer

Offline
Joined: 05 Jul 2003
Posts: 11138
Location: Brooklyn, NY or Cambridge, MA
United States

To rate posts you must be logged in
#19
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: a^p - a \equiv 0 \mod p for all primes p and integers a.
_________________
Joel
Hi Deeps! <3

PostPosted: Sat Jan 29, 2005 4:06 am
Display posts from previous:   Sort by:   
19 Posts • Page 1 of 1
View previous topicView next topic
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
You cannot post calendar events in this forum

Created and Maintained by Valentin Vornicu - (c) AoPS Inc. 2004-2008