# Thread: decimal expansion of 7^999,999

1. ## decimal expansion of 7^999,999

I'm trying to figure out how to solve this problem. I have flipped thru my notes and I can't find an example of how to do this problem.

Find the decimal expansion of {7}^{999999}.
Thanks for the help.

2. Originally Posted by drounds67
I'm trying to figure out how to solve this problem. I have flipped thru my notes and I can't find an example of how to do this problem.

Find the decimal expansion of {7}^{999999}.
Thanks for the help.
i don't know how many digits does this have. i didn't calculate. Use logarithms for that.
But i can tell you the last 7 numbers in the decimal expansion.
use euler's generalization of fermat's little theorem to get $7^{4\cdot10^6}\equiv1\,(\,mod\,10^7\,)$
this implies $7^{2\cdot10^6}\equiv1\,(\,mod\,10^7)$ why?
the above two give $7^{10^7}\equiv1\,(\,mod\,10^7\,)$.
let $7^{999999}\equiv x\,(\,mod\,10^7\,)$
so $7^{999999}\cdot7\equiv7 \cdot x\equiv1\,(\,mod\,10^7\,)$
the inverse of 7 wrt 10^7 is 2857143(you can go to wolframalpha for this or can do some long time computing yourself )
so, $x\equiv2857143\,(\,mod\,10^7\,)$
hence the last 7 digits of $7^{999999}$ are $2857143.$

i know that 7 is nothing compared to the number of digits in 7^{999999} but still...

3. Hello, drounds67!

What is the original wording of the problem?
As stated, the problem is really difficult to answer.

$\text{Find the decimal expanstion of: }\:7^{999,999}$

$\text{We have: }\:N \;=\;7^{999,999}$

$\text{Take logs: }\;\log N \;=\;\log\left(7^{999,999}\right) \;=\;999,\!999 \log 7$

. . . . . . . . . . . . . .$=\;999,999(0.84509804) \;=\;845,\!097.1949$

Hence: .$N \;=\;1.566488784 \times 10^{854,097}$

. . $\text{That is, }N\text{ begins }1,\!566,\!488,\hdots\,\text{ and has }854,098\text{ digits.}$

$\text{Writing one digit/sec, it will take nearly 10 days to write the number.}$

$\text{Writing 10 digits/inch, the number will stretch } 1\tfrac{1}{3}\text{ miles.}$

So what exactly did they ask for?