PE
XSamsara
AFO
展开
-
Project Euler #624 Two heads are better than one【斐波那契】
Project Euler #624 Two heads are better than one 【题目描述】 传送门 【题解】 最后我们可以通过打表或推理得到这个式子G(n)=∑i=1∞f(i∗n−1)2i∗nG(n)=\large \sum_{i=1}^{\infty} \frac{f(i * n-1)}{2^{i * n}}G(n)=∑i=1∞2i∗nf(i∗n−1),其中f(i)f(i...原创 2019-02-18 15:48:33 · 122 阅读 · 0 评论 -
Project Euler 512 Sums of totients of powers【欧拉函数】
Sums of totients of powers f(n)=(∑i=1nϕ(ni))mod(n+1)f(n)=(\sum_{i=1}^{n} \phi(n^i)) mod(n+1)f(n)=(∑i=1nϕ(ni))mod(n+1) g(n)=∑i=1nf(i)g(n)=\sum_{i=1}^{n} f(i)g(n)=∑i=1nf(i) 因为ϕ(ni)=ϕ(n)∗ni−1\phi(n^i)=...原创 2019-07-22 10:19:01 · 139 阅读 · 0 评论