Skip to main content
2 of 3
added 7 characters in body
Boris Novikov
  • 3.1k
  • 1
  • 16
  • 17

Calculating (n ^ fibonacci(k)) MOD m for a large value of k

The value of $k$ can be very large indeed (up to $10^{12}$). Is there an efficient way to calculate the output?