线性筛筛(sigma)
线性筛筛(sigma_0)
(p)是质数,(sigma_0(p)=2)
对于一个(i),如果(i)和(p)互质,根据积性函数得(sigma_0 (iast p)=sigma_0 (i)ast sigma_0 (p))
如果(i)和(p)不互质,那么(p|i)
设(i=prod_{i=1}^mP_i^{r_i})
则(past i=prod_{i=2}^mP_i^{r_i}ast P_1^{r_i+1})
(frac{i}{p}=prod_{i=2}^m P_i^{r_i}ast P_1^{r_i-1})
(sigma_0(i)=prod_{i=1}^m(r_i+1))
(sigma_0(iast p)=prod_{i=2}^m(r_i+1)+(r_1+2))
(sigma_0(frac{i}{p}) = prod_{i=2}^m(r_i+1)+r_1)
设(T=prod_{i=2}^m(r_i+1))
(sigma_0(i)=Tast (r_1+1))
(sigma_0(iast p)=Tast (r_1+2)=sigma_0(i)+T)
(sigma_0(frac{i}{p})=Tast r_1=sigma_0(i)-T)
可得(sigma_0(iast p)=2ast sigma_0(i)-sigma_0(frac{i}{p}))
线性筛筛(sigma)
(p)是质数,(sigma(p)=p+1)
对于一个(i),如果(i)和(p)互质,根据积性函数得(sigma(iast p)=sigma(i)ast sigma(p))
如果(i)和(p)不互质,那么(p|i)
设(i=prod_{i=1}^mP_i^{r_i})
则(p_1ast i=prod_{i=2}^mP_i^{r_i}ast P_1^{r_i+1})
(frac{i}{p}=prod_{i=2}^m P_i^{r_i}ast P_1^{r_i-1})
(sigma_i=prod_{i=1}^nfrac{p_i^{r_i+1}-1}{p_i-1})
(sigma_{iast p}=prod_{i=2}^nfrac{p_i^{r_i+1}-1}{p_i-1}ast frac{p_i^{r_1+2}-1}{p_1-1})
(sigma_{frac{i}{p}}=prod_{i=2}^nfrac{p_i^{r_i+1}-1}{p_i-1}ast frac{p_i^{r_1}-1}{p_1-1})
设(T=prod_{i=2}^nfrac{p_i^{r_i+1}-1}{p_i-1})
(sigma_{i}=Tast frac{p_i^{r_1+1}-1}{p_1-1})
(sigma_{iast p}=Tast frac{p_i^{r_1+2}-1}{p_1-1}=sigma_i+Tast p_1^{r_1+1})
(sigma_{frac{i}{p}}=Tast frac{p_i^{r_1}-1}{p_1-1}=sigma_i-Tast p_1^{r_1})
两边乘(p_1)得到(sigma_{frac{i}{p}}ast p_1=p_1ast sigma_i-Tast p_1^{r_1+1})
后两个式子相加可得(sigma_{iast p_1}=(p_1+1)ast sigma_i-p_1ast sigma_{frac{i}{p}})