Large Numbers Modulo a Non-Prime

Правка en1, от n0tred, 2019-06-27 17:01:02

How to efficiently calculate the value of $$$ \frac{3^{n}-1}{2} $$$ modulo an even number $$$ p $$$, when the bound on $$$ n $$$ is up to $$$ 10^{18} $$$ and $$$ p $$$ is up to $$$ 10^9 $$$?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский n0tred 2019-06-27 17:01:02 198 Initial revision (published)