Caught me… A pretty quick way to see this and the title is using Fermat’s little theorem which states that k^(p-1) ~ 1 mod p for nonzero k. Using this we can write
3*10^5 ~ 3^6 ~ 1 mod 7
and
3*10^8 ~ 3*(-3)^8 ~ 3^9 ~ 16^9 ~ 2^36 ~ (2^12)^3 ~ 1^3 ~ 1 mod 13
@m4m4m4m4
Caught me… A pretty quick way to see this and the title is using Fermat’s little theorem which states that k^(p-1) ~ 1 mod p for nonzero k. Using this we can write
3*10^5 ~ 3^6 ~ 1 mod 7
and
3*10^8 ~ 3*(-3)^8 ~ 3^9 ~ 16^9 ~ 2^36 ~ (2^12)^3 ~ 1^3 ~ 1 mod 13