$S = \{n: n \text{ is an integer and } n=n^n\}$ Let $S = {n: n \text{is an integer and} n= n^n}$. What elements are in $S$? I thought simply $1$ and $0$ but I'm not sure if $-1$ is since $-1$ only works sometimes.
 A: As you've sort of pointed out, $S$ contains $\Bbb Z^* = \{1,-1\}$. Now we prove that any number in $S$ has to be in $\Bbb Z^*$ (is $1$ or $-1$). Let $n\in S$. Then $$n = n^n$$
Now, we go up to $\Bbb Q$ for a bit and multiply by $n^{-1}$, assuming $n$ isn't $0$. Now we have $$1 = n^{n-1} = nn^{n-2}$$
Suppose that $|n| \geq 2$. In this case, if $n^{n-2}$ is an integer, then $n$ has an inverse in $\Bbb Z$ (namely $n^{n-2}$). But this means that $n = \pm 1$, a contradiction. Therefore when $|n|\geq -2$, $n^{n-2}$ is not an integer. Write $n^{n-2} = \frac{a}{b}$, with $a,b$ coprime. However, $n^n= n^{n-2}n^2$ is an integer by hypothesis. This means that $b\mid n^2$: Putting this together: $$n^{n-2} = \frac{n^n}{n^2} = \frac{a}{b} = \frac{a}{qn^2}\Rightarrow a = qn^n$$
By the coprimality assumption, $q = 1$ and $n^n$, $n^2$ are coprime. But then $\mathrm{gcd}(n^n,n^2) = n^2 = 1$, contradiction. Therefore $|n|\leq 1$. Lastly, $0$ is not in $S$ because $0^0 = 1$ (in this context), so $n$ must be either $1$ or $-1$.
Edit: I'll leave this up just because it was a nice exercise for me. For a very simple proof see the comments though.
