Fermat's little thoerem states, that $a^{p-1} \equiv 1 \mod p$, which results in the obvious truth of $a^p \equiv a \mod p$. My question is whether an analogous version of this statement exists for Euler's theorem, without the assumption of coprimality.
So when does $$a^{\varphi(m) + 1} \equiv a \mod m$$ hold true?
Obviously, this is true when $a \perp m$, which follows directly from Euler's theorem. It is also false if we take $a = 2, m = 4$. But it seems to be true for $m = 10$ and any $a$. Could this be true for any pair $(a, m)$ where $m$ is not a power of $a$, perhaps?