How to calculate summation 1/(n^2) with modulo prime number .

Правка en1, от Polar_, 2020-04-04 11:54:08

Hi! I need help in calculating $$$\sum\frac{1}{n^2}\%MOD$$$.
Where $$$MOD$$$ is a prime number .
I know that taking of inverse modulo for every $$$k^2$$$ where $$$ 1 \le k \le n $$$ then adding them up and taking modulo.
But if $$$n$$$ is order of $$$10^9$$$ then how to do it ?
Any faster way to do it ?
Thanks .

Теги #number theory, maths

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Polar_ 2020-04-04 11:54:08 370 Initial revision (published)