This was a cool number theory question.
lol nice where you used fermat’s last theorem, you mean his little theorem right?
yes