Let $M$ be the set of natural numbers $k$ for which there exists a natural number $n$ such that $$3^n \equiv k\pmod n.$$Prove that $M$ has infinitely many elements.
Source: First Romania JBMO TST 2016
Tags: number theory
Let $M$ be the set of natural numbers $k$ for which there exists a natural number $n$ such that $$3^n \equiv k\pmod n.$$Prove that $M$ has infinitely many elements.