About $(2+\sqrt 3)^n$ So today i noticed that for values of $n$ greater than $13$ the computer always seemed to consider $(2+\sqrt{3})^n$ as an integer. However, i have proved that this number should be of the form $a_n+b_n\sqrt{3}$ with $a_n,b_n$ two integer sequences which actually have an explicit formula (but this is not the problem here so i'll skip.)
$a_n,b_n$ being integer sequences, $a_n+b_n\sqrt{3}$ is obviously not an integer for every value of $n\in\mathbb N$.
So could anyone explain me why the computer always returns an integer ?
I have already noticed how the fractional part of $(2+\sqrt{3})^n$ seems to "converge to 1" very quickly. I think i can prove that as a matter of fact for great values of $n$, $(2+\sqrt{3})^n$ is always extremely close to an even integer while having its integer part odd. So because of the convergence of its fractional part the computer would rather return an integer than a number with a fractional part extremely close to $1$.
My question is : is this true ? If not, why ?
 A: Suppose any positive real just $\epsilon$ shy of an integer looks like an integer to your software. For large $n$,$$N:=(2+\sqrt{3})^n+(2-\sqrt{3})^n=(2+\sqrt{3})^n+\frac{1}{(2+\sqrt{3})^n}$$is an integer because$$(2+\sqrt{3})^n=a+b\sqrt{3}\implies (2-\sqrt{3})^n=a-b\sqrt{3}\implies N=2a.$$ But$$(2+\sqrt{3})^n=\frac{N+\sqrt{N^2-4}}{2}\approx N-1/N.$$(You can verify this approximation from e.g.$$(2+\sqrt{3})^n\approx N$$or $\sqrt{N^2-c^2}=N\sqrt{1-c^2/N^2}\approx N(1-c^2/(2N^2))$.) So if we choose $n$ large enough that $N>1/\epsilon$, the illusion is complete.
A: I’m expecting Will Jagy to beat me to it on this one.
Your number $2+\sqrt3$ is the primitive unit of the (integers of) the real quadratic field $\Bbb Q(\sqrt3\,)$. Each such unit $m+n\sqrt3$ will satisfy the “Pell” equation $X^2-3Y^2-\pm1$, but since your number is the primitive unit, and its norm $m^2-3y^2$ is equal to $1$, all units, that is, all powers $m+n\sqrt3$ of $2+\sqrt3$, will satisfy $m^2-3n^2=1$, no minus sign.
Now let’s plot these powers of $2+\sqrt3$ by separating the rational part $m$ as $x$ and the irrational part $n\sqrt3$ as $y$, that is, $m+n\sqrt3\mapsto(m,n\sqrt3)$, so that they all lie on the hyperbola $X^2-Y^2=1$. You’ve seen this in high-school, I’m sure, and you know that its asymptotes are $y=\pm x$.
Thus, as long as $x=m$, an integer, if $(x,y)$ is on the hyperbola, $y$ will be asymptotically (as $x\to\infty$) close to the integer $x$, but less than. So, if you want the fractional part of the real value $x+y$, it will be $1-(x-y)$.
In case the point is $(m,n\sqrt3\,)$ where $m+n\sqrt3=(2+\sqrt3\,)^N$ then the $y$-coordinate will be almost the integer $m$, and the fractional part of $m+n\sqrt3$ will be $1-(m-n\sqrt3)$. But $m+n\sqrt3=(2+\sqrt3\,)^N$ is still a unit, and its reciprocal is, lo and behold, $m-n\sqrt3=(2+\sqrt3\,)^{-N}$.
Result? The fractional part of $(2+\sqrt3\,)^N$ is $1-\rho^N$, where $\rho=2-\sqrt3=.2679\dots$
