2

I could calculate values of $1^1+\cdots$ for small numbers only. What if $k$ is a very large number maybe in order of $10^9$?

  • 4
    That would depend on the allowed magnitude of $m$, as another OP pointed out, lately (https://math.stackexchange.com/questions/2365906/efficient-method-to-find-funsumn-pmod-m-where-funsumn-00-11-22). Is that some contest problem? –  Jul 23 '17 at 06:40
  • Let $S$ be the sum then $s\equiv 0 ;(mod ;4)$ if $k\equiv 0$ or $k\equiv -1; mod ;4$ otherwise $s\equiv 1;(mod ;4)$. (I don't know why) – Raffaele Jul 23 '17 at 12:58

0 Answers0