5

Along a similar line to this question, (pattern in decimal representation of powers of 5), I was playing around in a mathematics program called GAP.

I was entering powers of two, when I noticed an odd pattern in the amount of digits produced, I'm sorry if this is not the right place to ask this question.

My first guess is that the number pattern is to do with the ratio of digits when converting from the base two representation to the base ten representation.

2^1 = 1 digit

2^12 = 4 digits

2^123 = 37 digits

2^1234 = 372 digits

2^12345 = 3717 digits

2^123456 = 37164 digits

2^1234567 = 371642 digits

2^12345678 = 3716420 digits

2^123456789 = 37164197 digits

2^1234567890 = 371641967 digits

If you could couch your answer in both technically (for other mathematicians) and layman's terms (for myself) it would be most appreciated.

Thankyou.

1 Answers1

2

The number of digits of a number $n$ is $1+\lfloor \log_{10}n \rfloor$, so the number of digits of $2^k=1+\lfloor \log_{10} 2^k\rfloor=1+\lfloor k\log_{10} 2\rfloor$. You can use $\log_{10}2 \approx 0.30103000$ (or get more digits here) to justify your values.

Ross Millikan
  • 374,822
  • Thanks for the answer, if the relationship between digits and base is associated with log values then that answers my question. I'll have fun later looking into the why behind the idea of log. – Chris poultney Mar 26 '15 at 17:51
  • 1
    As you add digits to the end of the exponent of $2$, you are essentially multiplying the exponent by $10$, which multiplies the number of digits by $10$. This explains the bulk patterns you see in the number of digits. – Ross Millikan Mar 26 '15 at 22:14