Comet OJ - Contest # 8 E. magical function

Old problem solution: https://blog.csdn.net/gmh77/article/details/99066792#commentBox

Before writing a little strange,This question does not reflect the sbSo again pushed

\(\because n=\sum_{d \mid n}{\varphi(d)}\)

\(\therefore \sum_{i=1}^{n}{f(i)}=\sum_{n}{\prod{{a_i}^{\left \lfloor \frac{p_i}{2} \right \rfloor}}}\)

\(=\sum_{n}{\sum_{\prod{{a_i}^{\left \lfloor \frac{p_i}{2} \right \rfloor}} \mid d}{\varphi(d)}}\)

\(=\sum_{d=1}^{\left \lfloor \sqrt{n} \right \rfloor}{\varphi(d)\sum_{n}{[d^2\mid n]}}\)$

\(=\sum_{d=1}^{\left \lfloor \sqrt{n} \right \rfloor}{\varphi(d)*\left \lfloor \frac{n}{d^2} \right \rfloor}\)

Guess you like

Origin www.cnblogs.com/gmh77/p/11827264.html