$1+\sqrt{2}$ seems special: its powers quickly approach integers [duplicate]
$ \alpha = 1+\sqrt{2}$ has some interesting properties. One of which is that if you look at powers \begin{align*} \alpha^2 &= 3+2\sqrt{2} \approx 5.8284 \\ \alpha^3 & \approx 14.0710 \\ \alpha^4 & \approx 33.9705 \\ & \vdots \\ \alpha^{10} & \approx 6725.9998 \\ \alpha^{11} & \approx 16238.0000 \\ \vdots & \end{align*} (values truncated, not rounded) then the sequence $\{ \alpha^n \}$ is "almost" an unbounded integer sequence. What is going on here? Is this property secondary to $\alpha$ being a unit in $\mathbb{Z}[\sqrt{2}]$? Can $\alpha$ be interpreted as a type of approximate eigenvalue? Does this behavior have to do with the continued fraction representation? Other numbers such as $1+\sqrt{3}$ have a similar property, but they don't appear to "become integer" as quickly.
The key fact here turns out to be that the conjugate (in this case in $\Bbb Q[\sqrt{2}]$) of $1 + \sqrt{2}$, namely, $1 - \sqrt{2}$, has absolute value less than $1$.
If we expand $$(1 + \sqrt{2})^n + (1 - \sqrt{2})^n$$ and apply the Binomial Theorem to both of the two powers, we find all of the nonintegral terms cancel, so $(1 + \sqrt{2})^n + (1 - \sqrt{2})^n$ is an integer for all $n$. But since $|1 - \sqrt{2}| < 1$, for large $n$ the term $(1 - \sqrt{2})^n$ tends to $0$ and so $$(1 + \sqrt{2})^n + (1 - \sqrt{2})^n \approx (1 + \sqrt{2})^n ,$$ and in particular $(1 + \sqrt{2})^n$ is close to an integer.
We can identify the sequence of integers that occurs, too: $(1 \pm \sqrt{2})$ are the roots of the polynomial $r^2 - 2 r - 1$, so $(1 + \sqrt{2})^n + (1 - \sqrt{2})^n$ satisfies the recurrence relation $$a_{n + 2} = 2 a_{n + 1} + a_n .$$ Evaluating at, say, $n = 0, 1$ gives $a_0 = a_1 = 2$, and these values and the recursion relation are enough to identify the sequence, $$2, 2, 6, 14, 34, \ldots .$$ This sequence is OEIS A002203, where its members are called the companion Pell numbers. (Its entries are exactly twice those of OEIS A001333, $1, 1, 3, 7, 17, \ldots$, the numerators of the continued fraction convergents of $\sqrt{2}$.) Since the initial values are integers, as are the coefficients in the recursion relation, this gives an alternative way of seeing that $(1 + \sqrt{2})^n + (1 - \sqrt{2})^n$ is an integer for all $n$.
Finally, working backward, we can indeed interpret $1 + \sqrt{2}$ (and its conjugate) as eigenvalues of a suitable matrix: The companion matrix associated to the polynomial $r^2 - 2 r - 1$ above is $\pmatrix{0&1\\1&2}$, and its eigenvalues are $1 \pm \sqrt{2}$. Then, a straightforward induction shows that $$\pmatrix{0&1\\1&2}^n \pmatrix{2&2\\2&6} = \pmatrix{a_n&a_{n + 1}\\a_{n + 1}&a_{n+ 2}} .$$
All of these phenomena, by the way are in close analogy to the more familiar case of the Golden Ratio, $\phi := \frac{1}{2}(1 + \sqrt{5})$. (You might work these details out to check that you understand the above arguments.) Indeed, $1 + \sqrt{2}$ has a geometric interpretation analogous to that of the Golden Ratio, and by analogy it is sometimes called the Silver Ratio; in turn these are the first two (nontrivial) members of the infinite family $\frac{n + \sqrt{n^2 + 4}}{2}$, $n = 0, 1, 2, \ldots$, of metallic means, all of which (except for the trivial case $n = 0$) have the key property re the conjugate.
Like you've observed, $1 + \sqrt{3}$ also has the key property, since $|1 - \sqrt{3}| < 1$. But $|1 - \sqrt{3}| > |1 - \sqrt{2}|$, so $|1 - \sqrt{3}|^n \to 0$ more slowly than $|1 - \sqrt{2}|^n \to 0$.
The roots of the polynomial $x^2-2x-1$ are $1+\sqrt2$ and $1-\sqrt2$, and the other root $1-\sqrt2$ is absolutely less than $1$.
This makes $1+\sqrt2$ a Pisot number, from which the the property you've noticed follows.
More concretely: The sequence $$ a_n = (1+\sqrt2)^n + (1-\sqrt2)^n $$ satisfies the homogeneous linear recurrence relation $$ a_n - 2a_{n-1} - a_{n-2} = 0 \qquad\text{that is, } a_n = 2a_{n-1} + a_{n-2} $$ because each of the two $n$th powers do so separately (note that the coefficients come from the polynomial above). We also find, by direct computation, $$ a_0 = 2 \qquad a_1 = 2 $$ so all of the $a_n$s are integers. But $(1-\sqrt2)^n$ becomes smaller and smaller, so $(1+\sqrt2)^n$ ends up being closer and closer to the integer $a_n$.
You could observe the pattern if you would calculate the powers: $$\begin{align}\alpha^1&=(1+\sqrt{2})^1=1+1\sqrt{2}\\ a^2&=(1+\sqrt{2})^2=3+2\sqrt{2}\\ a^3&=(1+\sqrt{2})^3=7+5\sqrt{2}\\ a^4&=(1+\sqrt{2})^4=17+12\sqrt{2}\\ \vdots \end{align}$$ So, basically, the second terms are important. The coefficients $1,2,5,12,...$ form the recurrence relation OEIS A000129: $$a_1=1,a_2=2,a_n=2a_{n-1}+a_{n-2},$$ Its solution is: $$a_n=\frac1{2\sqrt{2}}\left[(1+\sqrt{2})^n-(1-\sqrt{2})^n\right]$$ Hence: $$a_n\sqrt{2}=\frac{(1+\sqrt{2})^n-(1-\sqrt{2})^n}{2}=\frac{(1+\sqrt{2})^n+(1-\sqrt{2})^n-2(1-\sqrt{2})^n}{2}=\\ \frac{(1+\sqrt{2})^n+(1-\sqrt{2})^n}{2}-(1-\sqrt{2})^n$$ The first term is an integer, because its numerator is an even number and the second term approaches $0$ for large $n$, because $|1-\sqrt{2}|<1$, which were also stated in other answers and comments.
Hence, you can generalize for $\alpha=1+\sqrt{k}$: $$a_n\sqrt{k}=\frac{(1+\sqrt{k})^n+(1-\sqrt{k})^n}{2}-(1-\sqrt{k})^n$$ So, it depends on how fast the second term $(1-\sqrt{k})^n$ approaches $0$.