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

Revision en1, by 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 .

Tags #number theory, maths

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Polar_ 2020-04-04 11:54:08 370 Initial revision (published)