CapTa1nnn's blog

By CapTa1nnn, history, 3 years ago, In English

Hi everyone. i have to solve a problem like that finding the last three digits before the decimal point for the number (3+sqrt(5))^n with n <= 2e9. I thinked but don't have the idea about this problem. So thank you if you help me to solve and i want to know that if with anyone number such is not integer number. can i finding the last three digits before the decimal point. Very thank you

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
3 years ago, hide # |
Rev. 2  
Vote: I like it +13 Vote: I do not like it

Take all coefficients modulo $$$1000$$$. $$$(3+\sqrt5)^n+(3-\sqrt5)^n$$$ is an integer by the binomial theorem so you only need to compute the value of $$$(3+\sqrt5)^n+(3-\sqrt5)^n$$$, which you can do by using binary exponentiation to find $$$(3+\sqrt5)^n=a+b\sqrt5$$$ and $$$(3-\sqrt5)^n=a-b\sqrt5$$$, then use the fact that $$$(3-\sqrt5)^n \lt 0.8^n \lt 1$$$.