Let $x$ is a real number such that $n^x\in\Bbb Z,$ for every positive integer $n.$ Prove that $x$ is an integer.
I got that problem here and it looks difficult, I tried writing $x$ as $\lfloor x\rfloor+\{x\}$ (where $\lfloor x\rfloor$ and $\{x\}$ are the floor and the fractional part of $x,$ respectively), then $$n^x=n^{\lfloor x\rfloor}n^{\{x\}}.$$ Since $n^{\lfloor x\rfloor}>0,$ then $$n^{x-\lfloor x\rfloor}=n^{\{x\}},$$ so that $n^{\{x\}}$ must be a rational number for every positive integer $n,$ but I don't know how to prove that $\{x\}$ must necessarily be $0$ ($0\leq\{x\}<1$).
Any help is really appreciated!