When is $(-1+\sqrt{5})^x$ a rational number? 
When is $(-1+\sqrt{5})^x$ a rational number for some integer $x$?

We know that $(-1+\sqrt{5})^x = A+B\sqrt{5}$ since $5$ is a prime for $x > 0$, but how do I determine when the $B$ term is $0$? Similarly when $x$ is negative.
 A: For a more elementary answer, note that the reciprocal of $(-1+\sqrt5)^x$, which is $(1+\sqrt5)^x4^{-x}$, must also be rational, hence so is $(1+\sqrt5)^x$. Now you can apply the binomial theorem without worrying about cancellation to see that among the nonnegative integers only $0$ produces a rational number, and negative values of $x$ yield the reciprocals which therefore must also be irrational.
A: Here is a different approach to the problem.  Let $\varphi:\mathbb{Q}(\sqrt{5})\to\mathbb{Q}(\sqrt{5})$ be the automorphism that sends $\sqrt{5}$ to $-\sqrt{5}$.  Note that for $a\in \mathbb{Q}(\sqrt{5})$, $a\in\mathbb{Q}$ iff $\varphi(a)=a$.  So if $(-1+\sqrt{5})^x$ is rational, then $$(-1+\sqrt{5})^x=\varphi((-1+\sqrt{5})^x)=(-1-\sqrt{5})^x.$$  This clearly can only happen for $x=0$ (for instance, since $\left|-1+\sqrt{5}\right|<\left|-1-\sqrt{5}\right|$ so $\left|(-1+\sqrt{5})^x\right|<\left|(-1-\sqrt{5})^x\right|$ for $x>0$ and $\left|(-1+\sqrt{5})^x\right|>\left|(-1-\sqrt{5})^x\right|$ for $x<0$).
A: It is an immediate consequence of the Gelfond-Schneider Theorem (a.k.a. the Gelfond Theorem) that if $(-1+\sqrt 5)^x$ is rational and $x\ne 0$ then $x$ is transcendental over the rationals. And of course there are only countably many $x$ for which $(-1+\sqrt 5)^x$ is rational.
