# How to write $[(2+\sqrt{3})^n + (2-\sqrt{3})^n + (2+\sqrt{3})^{n+1} + (2-\sqrt{3})^{n+1}]/6$ to the form $a^2 + 2 b^2$ ($a, b \in \mathbb{N}$).

We know that $$(2+\sqrt{3})^n + (2-\sqrt{3})^n$$ is an integer (See here).

However, we want to write the formula \begin{align} &\frac{3+\sqrt{3}}{6} (2+\sqrt{3})^n + \frac{3-\sqrt{3}}{6} (2-\sqrt{3})^n\\ &=\frac{1}{6} \left[(2+\sqrt{3})^{n+1} + (2-\sqrt{3})^{n+1} + (2+\sqrt{3})^n + (2-\sqrt{3})^n\right] \end{align} to the form $$a^2 + 2\,b^2,\ (a, b \in \mathbb{N}).$$

How?

• Welcome to Math Stack Exchange. Call the formula $f(n)$. Can you prove for $n$ even $f(n)=f(n/2)^2+2x^2$ and for $n$ odd $f(n)=f((n-1)/2)^2+2y^2$? – J. W. Tanner May 6 '19 at 3:30
• The two irrational numbers $2\pm\sqrt{3}$ are roots of the quadratic equation $x^2= 4x-1$. So if we define a recurrence relation $(a_n)$ by the recurrence $$a_{n+2}:=4a_{n+1}-a_n$$ with initial conditions $a_0:=2$ and $a_1:=4$, then clearly $a_n\in \mathbb{Z}$ for all $n\geq 0$, and yet "routine" combinatorial analysis gives $$a_n = (2+\sqrt{3})^n+(2-\sqrt{3})^n$$ for all $n$. This proves that these numbers are actually integers. Now try the same technique on the number that you're interested it --- usually these linear combinations of powers of algebraic numbers give linear recurrences. – Ehsaan May 6 '19 at 3:36
• @J.W.Tanner Well done! But how did you come up with that idea? Even though I may have seen something similar, there seems to be a hole in my education :-) – Jyrki Lahtonen May 6 '19 at 3:53
• Yummy, can you tell us more about the origin of this problem? May be you can also take a look at our guide for new askers? – Jyrki Lahtonen May 6 '19 at 4:10
• @JyrkiLahtonen: thank you for the compliment! Do you remember learning a relationship between the $2n^{th}$ Fibonacci number and the ${n-1}$ and $n^{th}$ Fibonacci numbers? – J. W. Tanner May 6 '19 at 5:17

Let $$f(n)= \dfrac{3+\sqrt{3}}{6} (2+\sqrt{3})^n + \dfrac{3-\sqrt{3}}{6} (2-\sqrt{3})^n$$ and $$g(n)=\dfrac{\sqrt3} 6(2+\sqrt3)^n-\dfrac{\sqrt3}6(2-\sqrt3)^n$$.

Can you show $$f(n)^2+2\times g(n)^2=f(2n)$$ and $$f(n)^2+2\times g(n+1)^2=f(2n+1)?$$

• Helpful hints: $(2+\sqrt3)(2-\sqrt3)=1; (3\pm\sqrt3)^2=6(2\pm\sqrt3)$ – J. W. Tanner May 6 '19 at 5:19
• Thank you very much! How did you get this method? This is really amazing. – Yummy May 6 '19 at 8:56

Call your formula $$f(n)$$. Since $$2\pm\sqrt{3}$$ are the roots of $$x^2-4x+1$$, it's easy to show that $$f(n)$$ is determined by $$f(0)=1$$, $$f(1)=3$$ and the recursive relation $$f(n+1)=4f(n)-f(n-1)$$.

After looking at @J.W.Tanner comment, I found out that we actually have \begin{align*} f(2n)&=f(n)^2+2\left(\sum_{0\leq k\leq n-1}f(k)\right)^2\\ f(2n+1)&=f(n)^2+2\left(\sum_{0\leq k\leq n}f(k)\right)^2 \end{align*} Now, I don't really know how difficult is to prove this by induction, but it is an interesting pattern.