Wilson's Theorem

Proofs
Suppose first that p is composite. Then p has a factor d>1 that is less than or equal to p1. Then d divides (p1)!, so d does not divide (p1)!+1. Therefore p does not divide (p1)!+1.

Two proofs of the converse are provided: an elementary one that rests close to basic principles of modular arithmetic, and an elegant method that relies on more powerful algebraic tools.

Elementary proof
Suppose p is a prime. Then each of the integers 1,,p1 has an inverse modulo p. (Indeed, if one such integer a does not have an inverse, then for some distinct b and c modulo p, abac(modp), so that a(bc) is a multiple of p, when p does not divide a or bc—a contradiction.) This inverse is unique, and each number is the inverse of its inverse. If one integer a is its own inverse, then 0a21(a1)(a+1)(modp), so that a1 or ap1. Thus we can partition the set {2,,p2} into pairs {a,b} such that ab1(modp). It follows that (p1) is the product of these pairs times 1(1). Since the product of each pair is conguent to 1 modulo p, we have (p1)!11(1)1(modp), as desired.

Algebraic proof
Let p be a prime. Consider the field of integers modulo p. By Fermat's Little Theorem, every nonzero element of this field is a root of the polynomial P(x)=xp11. Since this field has only p1 nonzero elements, it follows that xp11=r=1p1(xr). Now, either p=2, in which case aa(mod2) for any integer a, or p1 is even. In either case, (1)p11(modp), so that xp11=r=1p1(xr)=r=1p1(x+r). If we set x equal to 0, the theorem follows.

Problems
Introductory
(Source: ARML 2002) Let a be an integer such that 11+12+13++123=a23!. Find the remainder when a is divided by 13.
Solution
Multiplying both sides by 23! yields 23!1+23!2+...+23!23=a Note that 1323!k for all k13. Thus we are left with a23!1312!141516...23(1)(1)(2)(3)(...)(10)7mod13
Advanced
If p is a prime greater than 2, define p=2q+1. Prove that (q!)2+(1)q is divisible by p. Solution.
Let p be a prime number such that dividing p by 4 leaves the remainder 1. Show that there is an integer n such that n2+1 is divisible by p.

 

Problem
For how many integers n between 1 and 50, inclusive, is (n21)!(n!)n an integer? (Recall that 0!=1.)

(A) 31(B) 32(C) 33(D) 34(E) 35

Solution 1
The main insight is that

(n2)!(n!)n+1
is always an integer. This is true because it is precisely the number of ways to split up n2 objects into n unordered groups of size n. Thus,

(n21)!(n!)n=(n2)!(n!)n+1n!n2
is an integer if n2n!, or in other words, if n(n1)!. This condition is false precisely when n=4 or n is prime, by Wilson's Theorem. There are 15 primes between 1 and 50, inclusive, so there are 15 + 1 = 16 terms for which

(n21)!(n!)n
is potentially not an integer. It can be easily verified that the above expression is not an integer for n=4 as there are more factors of 2 in the denominator than the numerator. Similarly, it can be verified that the above expression is not an integer for any prime n=p, as there are more factors of p in the denominator than the numerator. Thus all 16 values of n make the expression not an integer and the answer is 5016=(D) 34.

Solution 2
We can use the P-Adic Valuation of n to solve this problem (recall the P-Adic Valuation of 'n' is denoted by vp(n) and is defined as the greatest power of some prime 'p' that divides n. For example, v2(6)=1 or v7(245)=2 .) Using Legendre's formula, we know that :

vp(n!)=i=1npi
Seeing factorials involved in the problem, this prompts us to use Legendre's formula where n is a power of a prime.

We also know that , vp(mn)=nvp(m) . Knowing that ab if vp(a)vp(b) , we have that :

nvp(n!)vp((n21)!) and we must find all n for which this is true.

If we plug in n=p, by Legendre's we get two equations:

vp((n21)!)=i=1n21pi=(p1)+0+...+0=p1
And we also get :

vp((n!)n)=nvp(n!)=ni=1npi=p(1+0+...0)=p
But we are asked to prove that nvp(n!)vp((n21)!)pp1 which is false for all 'n' where n is prime.

Now we try the same for n=p2 , where p is a prime. By Legendre we arrive at:

vp((p41)!)=p3+p2+p3 and p2vp(p2!)=p3+p2
Then we get:

p2vp(p!)vp((n41)!)p3+p2p3+p2+p3 Which is true for all primes except for 2, so 22=4 doesn't work. It can easily be verified that for all n=pi where i is an integer greater than 2, satisfies the inequality :nvp(n!)vp((n21)!).

Therefore, there are 16 values that don't work and 5016=(D) 34 values that work.

posted on   Eufisky  阅读(262)  评论(0编辑  收藏  举报

编辑推荐:
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
阅读排行:
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
历史上的今天:
2019-01-14 试题
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示