Блог пользователя CapTa1nnn

Автор CapTa1nnn, история, 22 месяца назад, По-английски

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

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
22 месяца назад, # |
Rev. 2   Проголосовать: нравится +13 Проголосовать: не нравится

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<0.8^n<1$$$.