Prime
来源:互联网 发布:百胜软件 编辑:程序博客网 时间:2024/04/30 14:50
A positive integer p is called prime if it has just two divisors, namely 1 and p. By convention 1 is not prime number.The numbers have three or more divisors are called composite.
Any positive integer n can be written as a product of primes n=p1*p1* p2*p3 ......*pm;
Prove: we suppose that every integer less than k can be written as a product of primes.
If k+1 is a prime ,k+1=k+1,it can be written as a product of primes.
If not,k+1 can be composite as n1*n2, and 1<n1<k+1,1<n2<k+1.
∵ every integer less than k can be written as a product of primes,
∴ n1=p1*p2*...*pn;n2=q1*q2*...*qm;
∴ k+1 = p1*p2*...*pn*q1*q2*...*qm;
∴ k+1 can be written as a product of primes
Moreover, there is only one way to write n as a product of primes in nodecreasing order.
Prove: we suppose that every integer less than k has only one way to be written as a product of primes in nodecreasing order.
If k+1 is a prime ,k+1=k+1,it has only one way to be written as a product of primes in nodecreasing order.
If not,k+1 = p1*p2*...*pn=q1*q2*...*qm;
If p1 != q1,we suppose p1<q1,so we have a*p1+b*q1 =1;
∴ we have a*p1*q2*...*qm+b*q1*q2*...*qm = q2*...*qm;
∴ q2*...*qm/p1 is a integer
∴ q2*...*qm has a prime factorization in which p1 appears.
∴ q2*...*qm has at least two way to be written as a product of primes in nodecreasing order.
∵ q2*...*qm<k+1;
But For our suppose it should has only one way to be written as a product of primes in nodecreasing order.
So p1 should equal to q1.
So we can use this way to prove that p1=q1,p2=q2,and so on
Every positive integer can be written uniquely in the form k=(p1^n1)*(p1^n1)*(p2^n2)*...*(pm^nm) where each nm >=0;
As we think of the sequence<2,3,5,...> as a number system for positive integers,so we have 12 is<2,1,0,0,....>
18 is <1,2,0,0,......>
- Prime
- prime
- Prime
- prime
- Prime
- prime
- prime
- PRIME
- prime
- Prime
- class Prime
- prime cuts
- Prime Palindromes
- 1056 Prime
- Prime Palindromes
- C++prime
- Prime Number
- Prime Cryptarithm
- 与你分享五年HR招聘与面试的体会
- 下拉列表式的友情链接
- 用Visual C++.NET进行GDI+编程
- 你也许不知道的真实历史
- Tomcat启动分析
- Prime
- 关于java数组的深度思考
- Visitor模式小节
- 入狱申请表 list of balneation
- 2006年9月23日 成都User Group活动-Web Services 应用优势的探索与思考-火热报名中
- 使用xsl实时处理xml文档(Javascript语言)
- 找工作
- 踏出第一步
- 网站开发规范