Fermat theorem, Euler's function

Source: Internet
Author: User

Prove an interesting theorem before proving these theorems.

For 0 mod m,n mod m, 2n mod m, 3n mod m, 4n mod m ... (m-1) n mod m

The corresponding solution set sequence must have M/D part 0 D 2d 3d. M-d. (not necessarily in order) such a solution. where d = gcd (n,m)

Specific point: n=8,m=12. D = gcd (n,m) =4

For 0 mod 12,8 mod 12,16 mod 12,24 mod 12,32 mod 12,40 mod 12...88 mod 12.

Corresponding Solutions 0 8 4 0 8 4 ..... 4

The obvious conclusion should be right.

Prove:

Fermat theorem:

N^p-1≡1 (mod p), n^p-1 mod p = 1. where n and P are mutually vegetarian.

Prove:

We can construct a p-1 n mod p,2n mod p,3n mod p ... (p-1) n mod p

According to the congruence operation (to turn the remainder into the same Yu Shizi):

Then there is (P-1)! n^ (p-1) ≡ (p-1)! (mod p)

WHERE (p-1)! P is not divisible so the formula becomes n^ (p-1) ≡ (mod p), proof.

You can also multiply n on both sides. N^p≡n (mod p)

Here's a little thought episode:

Consider the following proof:

Due to n and P-biotin. So there is n≡1 (mod p). According to the congruence theorem n^ (p-1) ≡1^ (p-1) (mod p), n^ (p-1) ≡ (mod p), the certificate.

Simple and clear. But it's wrong. Because the premise is wrong. Due to n and P reciprocity. Not necessarily n≡1 (mod p)

Can only be said that due to N and P reciprocity, exists kn≡1 (mod p) (k|1,2,3..p-1) (according to the above theorem)

Example n=2 p=5. There is 3n mod p = 1. and n mod p = 2.

Euler functions:

function: Enter n, do you want to know how many numbers in 1~n and n are mutually-vegetarian?

This is a function of Euler's function. It also allows the extended Fermat theorem to be expanded. The sum of the qualitative factors

The Euler function is a φ function, which means φ (1) = 1,φ (2) =1,φ (3) =2 ...

for φ (n).

If n is a prime number, that is, φ (n) = n-1.

If n is composite, that is, φ (n) < n-1.

Obviously this is not enough for the application. Of course we want to be able to enter N to get concrete results, not just scope.

For this problem: we can solve the problem in the next proof and find something new.

If M is a prime power p^k (such as 2^3), φ (p^k) can still be calculated.

How many and p^k are there in 1~p^k-1?

Then we can find out what the number is without P factor.

Then we can find the number of P-factor. Then the total number minus and p^k the number of non-reciprocity.

Fermat theorem, Euler's function

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.