# $\lfloor a^m\rfloor \equiv -1\mod n$ for $a = n+\sqrt{n^2 - n}$

Let $$n \ge 2$$ be an integer. Let $$a = n+\sqrt{n^2 - n}$$. Prove that for any positive integer m, we have $$\lfloor a^m\rfloor \equiv -1\mod n$$.

Suppose $$(x-a)(x-c) = x^2 + ux + v \in \mathbb{Z}[x]$$ (the ring of polynomials with integer coefficients) with $$0. To ensure that such a c exists in the first place, I think we can just pick $$c$$ to be $$1-\{a\}$$ where $$\{a\} := a-\lfloor a\rfloor$$. Note that this choice of c is actually unique, since there is a unique value x between 0 and 1 inclusive so that $$a+x$$ is an integer. Note that $$n-1 < \sqrt{n^2 - n} < n$$, so the fractional part of a is just $$\sqrt{n^2 - n} - n+1$$. Then $$ac = (n+\sqrt{n^2 - n}) (n-\sqrt{n^2-n}) = n,$$ which is indeed an integer. Then $$\lfloor a^m \rfloor = a^m +c^m - 1$$. To see why, observe that this holds for $$m=1$$ by the definition of c. We know from the beginning of this paragraph that both $$a+c$$ and $$ac$$ are integers, so $$a^2 + c^2 = (a+c)^2 - 2ac$$ is an integer. Then assuming $$a^m+c^m$$ and $$a^{m-1}+c^{m-1}$$ are both integers, we see that $$a^{m+1} + c^{m+1} = (a+c)(a^m + c^m) - ac(a^{m-1} + c^{m-1})$$ is an integer. Since $$0 and $$a^m$$ is irrational for all m, we see that $$\lfloor a^m + c^m\rfloor = a^m+c^m-1$$. Now it may be useful to come up with some recurrence relations and to use the fact that $$a$$ is irrational.

• In the title you ask a question which is not pursued in the question body. Also that question is trivial, take any irrational b in $(0,1),$ Commented Oct 22, 2023 at 21:36
• Do you really mean the floor function since, if so, it is trivial as coffeemath says. Commented Oct 23, 2023 at 2:48
• Is this question still open? Commented Feb 11 at 9:14