Skip to content

Instantly share code, notes, and snippets.

@abozhilov
Last active June 10, 2020 23:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abozhilov/5249833 to your computer and use it in GitHub Desktop.
Save abozhilov/5249833 to your computer and use it in GitHub Desktop.
2^1000 mod 100?
2^1 = 2 (mod 100)
-------------------
2^2 = 4 (mod 100)
2^3 = 8 (mod 100)
2^4 = 16 (mod 100)
2^5 = 32 (mod 100)
2^6 = 64 (mod 100)
2^7 = 28 (mod 100)
2^8 = 56 (mod 100)
2^9 = 12 (mod 100)
2^10 = 24 (mod 100)
2^11 = 48 (mod 100)
2^12 = 96 (mod 100)
2^13 = 92 (mod 100)
2^14 = 84 (mod 100)
2^15 = 68 (mod 100)
2^16 = 36 (mod 100)
2^17 = 72 (mod 100)
2^18 = 44 (mod 100)
2^19 = 88 (mod 100)
2^20 = 76 (mod 100)
2^21 = 52 (mod 100)
------------------
2^22 = 4 (mod 100) -> repeat the cycle except 2^1
999 mod 20 = 19
2^1000 = 2^20 = 76 (mod 76)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment