<s>[INST] Finding $(a+b)^n + (a-b)^n$ when $b$ is a radical We aim to find the unit digit of the following expression: $(5+\sqrt{24})^{1234}+(5-\sqrt{24})^{1234}$.
I tried finding a pattern of summing two binomials by observing:
$(a+b)^2+(a-b)^2 = (a^2 + 2ab + b^2) + (a^2 - 2ab + b^2) = 2a^2 + 2b^2$
$(a+b)^3+(a-b)^3 = (a^3 + 3a^2b + 3ab^2 + b^3) + (a^3 - 3a^2b + 3ab^2 - b^3) = 2a^3+6ab^2$
$(a+b)^4+(a-b)^4 = (a^4+4a^3b+6a^2b^2+4ab^3+b^4) + (a^4-4a^3b+6a^2b^2-4ab^3+b^4) = 2a^4+12a^2b^2+2b^4$
and so on. For $(5+\sqrt{24})^{n}+(5-\sqrt{24})^{n}$ where $n$ is even, I observed that every resulting term except for the final term $2b^n$ returns a unit digit of $0$, as every term consists $c\cdot 5^m$ where $c$ and $m$ are even.
Hence, the unit digit of $(5+\sqrt{24})^{1234}+(5-\sqrt{24})^{1234}$ equals to the unit digit of $\sqrt{24}^{1234}$, which is $24^{617}$. By the cyclicity of $4$, I concluded that the unit digit of $(5+\sqrt{24})^{1234}+(5-\sqrt{24})^{1234}$ is $4$.
Unfortunately, this was a part of a multiple choice problem, and $4$ was not an available option. What was my erroneous assumption, and what is a mathematical way to tackle this problem?
 [/INST] Well that was careless of me! The unit digit would be the doubled value of $4$, as it is $2b^n$ that determines the unit digit, not $b^n$.
Hence, the unit digit of the expression would be $8$.
</s>