Determine the digit immediately to the left of the decimal point in the base ten representation of (3+√7)2004
**** For an extra challenge, solve this puzzle using only pen and paper.
The solution to the problem
The Irrational Units Digit has a general method of solving this. Trivially modifying that solution can also solve this problem.
3+sqrt(7) and 3-sqrt(7) are the roots of x^2 - 6x + 2 = 0.
Let S(n) be the sequence of integer values (3+sqrt(7))^n + (3-sqrt(7))^n.
Then applying the method from The Irrational Units Digit, a recursion is formed: S(n+2) = 6*S(n+1) - 2*S(n).
By direct calculation the units digit of S(1) and S(2) are 6 and 2, respectively. Then S(n) mod 10 continues with a repeating cycle of 24 values (starting at n=1 mod 24): 6, 2, 0, 6, 6, 4, 2, 4, 0, 2, 2, 8, 4, 8, 0, 4, 4, 6, 8, 6, 0, 8, 8, 2
2004 mod 24 = 12, which then means that S(2004)mod10 = S(12)mod10 = 8. Then because S(2004) is very slightly greater than (3+sqrt(7))^2004, the digit sought is 8-1 = 7.