贾志鹏ppt https://wenku.baidu.com/view/2d706761aa00b52acec7ca63.html
一个证明 http://blog.csdn.net/zmoiynlp/article/details/44566631
一个介绍http://blog.csdn.net/qingshui23/article/details/50969344
自写筛欧拉函数
phi[1]=1; for (unsigned int i=2; i<N; i++){ if (!phi[i]) p[pnum++]=i,phi[i]=i-1; for (unsigned int j=0; j<pnum&&p[j]*i<N; j++){ if (i%p[j]==0){ phi[i*p[j]]=phi[i]*p[j]; break; } phi[i*p[j]]=phi[i]*phi[p[j]]; } }