I'm unsure how to compute the following : 3^1000 (mod13)
I tried working through an example below,
ie) Compute $3^{100,000} \bmod 7$ $$ 3^{100,000}=3^{(16,666⋅6+4)}=(3^6)^{16,666}*3^4=1^{16,666}*9^2=2^2=4 \pmod 7\\ $$
but I don't understand why they divide 100,000 by 6 to get 16,666. Where did 6 come from?