RSA smaller number work-out-by-hand not working - I think I made a mistake
At the encryption step, you wrote:

Public Key:
n = 667
k = 3

Input:
p = 13

Encrypted Integer:
E = (p ^ k) % n


And then mistakenly calculated:

(13 ^ 7) % 667 = 492
______^_____________


If you calculate it right using k = 3, you will get E = 196 which correctly decrypts to 13.

(as expected)