摘要: 链接:http://poj.org/problem?id=2773DescriptionTwo positive integers are said to be relatively prime to each other if the Great Common Divisor (GCD) is 1. For instance, 1, 3, 5, 7, 9...are all relatively prime to 2006. Now your job is easy: for the given integer m, find the K-th element which is relati 阅读全文
posted @ 2012-02-24 19:59 淡墨æ末央 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 本文转自 :http://blog.sina.com.cn/s/blog_694034130100wlrh.html欧拉函数:对于一个正整数n,小于n且和n互质的正整数的个数,记做:φ(n),其中φ(1)被定义为1,但是并没有任何实质的意义。特殊性质:当n为奇数时,φ(2n)=φ(n)。完全余数集合:定义小于n且和n互质的数构成的集合为Zn,称呼这个集合为n的完全余数集合。显然,对于素数p,φ(p)= p - 1.对于两个素数p、q,他们的乘积n = pq 满足φ(n) =(p-1)(q-1)证明:对于质数p,q,满足φ(n) =(p-1)(q-1)考虑n的完全余数集Zn = { 1,2,.. 阅读全文
posted @ 2012-02-24 16:54 淡墨æ末央 阅读(379) 评论(0) 推荐(0) 编辑