Some background: I was working on a problem that asked for the sum of the cubes of the roots of a cubic, $x^3 - 5x^2 + 5x - 1$. I found that this factored into $(x-1)(x^2 - 4x + 1)$, meaning that its roots are $1$ and $2 \pm \sqrt{3}$. After finding the sum of the cubes of them, I re-checked my work by manually cubing the roots and adding them together. While I was looking at the powers of $2 + \sqrt{3}$, I noticed that the integer component of the sum approached the same value as the irrational component. For example, $(2 + \sqrt{3})^3 = 26 + 15\sqrt{3} = \sqrt{676} + \sqrt{675}$, which is way closer than $2$ and $\sqrt{3}$ are. Moreover, when I looked at the powers of more expressions of the form $a + \sqrt{b}$, where $a$ and $b$ were integers and $b$ was not a perfect square, I noticed that when $a = \lfloor \sqrt{b} \rfloor$, the quotient of the coefficients of the rational and irrational terms after simplification is equal to a partial sum of the infinite fraction of $\sqrt{b}$. For example, the continued fraction of $\sqrt{2}$ is $$1 + \cfrac{1}{2 + \cfrac{1}{2 + \cfrac{1}{2 + \cfrac{1}{2 + \cdots}}}}$$and the first few partial fractions are $$1, \frac{3}{2}, \frac{7}{5}, \frac{17}{12}, \frac{41}{29}, \cdots$$Let $p_{a\sqrt{b}}$ denote the $a^{\text{th}}$ partial sum of the infinite fraction of $\sqrt{b}$. Looking at the powers of $1 + \sqrt{2}$, and letting $r_{c}$ be the ratio of the coefficients of the rational and irrational terms (i.e. $r_{c} = \frac{\text{coefficient}_{\text{rational}}}{\text{coefficient}_{\text{irrational}}}$), we find\begin{align*}&(1 + \sqrt{2})^1 = 1 + 1\sqrt{2} \Rightarrow r_{c} = \frac{1}{1} = 1 = p_{1\sqrt{2}}\\ &(1 + \sqrt{2})^2 = 3 + 2\sqrt{2} \Rightarrow r_{c} = \frac{3}{2} = p_{2\sqrt{2}} \\ &(1 + \sqrt{2})^3 = 7 + 5\sqrt{2} \Rightarrow r_{c} = \frac{7}{5} = p_{3\sqrt{2}} \end{align*}etc. This pattern also appears to hold for other values of $b$, as long as $a = \lfloor \sqrt{b} \rfloor$. For example, the continued fraction of $\sqrt{5}$ is $$2 + \cfrac{1}{4 + \cfrac{1}{4 + \cfrac{1}{4 + \cfrac{1}{4 + \cdots}}}}$$and the first few partial fractions are $$2, \frac{9}{4}, \frac{38}{17}, \frac{161}{72}, \frac{682}{305}, \cdots$$ Looking at the powers of $2 + \sqrt{5}$, we have\begin{align*}&(2 + \sqrt{5})^1 = 2 + 1\sqrt{5} \Rightarrow r_{c} = \frac{2}{1} = 2 = p_{1\sqrt{5}}\\ &(2 + \sqrt{5})^2 = 9 + 4\sqrt{2} \Rightarrow r_{c} = \frac{9}{4} = p_{2\sqrt{5}} \\ &(2 + \sqrt{5})^3 = 38 + 17\sqrt{5} \Rightarrow r_{c} = \frac{38}{17} = p_{3\sqrt{5}} \end{align*}Does this method actually work for all possible $b$, and if so, has anyone else catalogued this yet? As someone who pursues math for fun, I find this to be a very interesting result! Also, would there be an elegant way to prove that $r_c$ approaches $\sqrt{b}$ as $n$, the exponent, increases to infinity? I think that the binomial theorem would be very helpful, especially the fact that $\binom{n}{0} + \binom{n}{2} + \cdots = \binom{n}{1} + \binom{n}{3} + \cdots$. Thank you for taking the time to read this exceptionally long post, and any help would be appreciated!
Edit: Some of the comments are mentioning that the aforementioned process fits some patterns. Could someone explain how those patterns work/are generated?