Homepage Solution manuals Ivan Niven An Introduction to the Theory of Numbers Exercise 4.5.13* (There is exactly one power of $2$ having $k$ digits with leading digit $1$)

Exercise 4.5.13* (There is exactly one power of $2$ having $k$ digits with leading digit $1$)

For any integer k > 1 , prove that there is exactly one power of 2 having exactly k digits with leading digit 1 , when written in standard fashion to base 10 . For example 2 4 = 16 , 2 7 = 128 . Prove also that there is exactly one power of 5 having exactly k digits with leading digit not equal to 1 .

Answers

Proof.

(a)
If j is a positive integer, 2 j has exactly k digits with leading digit 1 if and only if 1 0 k 1 2 j < 2 1 0 k 1 . Since 2 j is never a power of 10 , this is equivalent to 1 0 k 1 < 2 j < 2 1 0 k 1 .

Moreover,

1 0 k 1 < 2 j < 2 1 0 k 1 ( k 1 ) ln 10 j ln 2 < ( k 1 ) ln 10 + ln 2 ( k 1 ) ln 10 ln 2 < j < ( k 1 ) ln 10 ln 2 + 1 j < ( k 1 ) ln 10 ln 2 + 1 < j + 1 j = 1 + ( k 1 ) ln 10 ln 2 .

There is exactly one power of 2 having exactly k digits with leading digit 1 , given by 2 j , where

j = 1 + ( k 1 ) ln 10 ln 2 .

Example:

     sage: k = 17
     sage: j = 1 + floor((k - 1) * log(10,2)); j
     54
     sage: 2^j
     18014398509481984
      

(b)
Similarly, 5 j has exactly k digits with leading digit not equal to 1 if and only if 2 1 0 k 1 < 5 j < 1 0 k (since 2 1 0 k 1 is never a power of 5 ), and 2 1 0 k 1 < 5 j < 1 0 k ( k 1 ) ln 10 + ln 2 < j ln 5 < k ln 10 k ln 10 ln 5 < j ln 5 < k ln 10 j ln 5 < k ln 10 < ( j + 1 ) ln 5 j < k ln 10 ln 5 < j + 1 j = k ln 10 ln 5

There is exactly one power of 5 having exactly k digits with leading digit not equal to 1 , given by 5 j , where

j = k ln 10 ln 5 .

Example:

     sage: k = 5
     sage:  j = floor( k * log(10, 5))
     sage: 5^j
     78125

User profile picture
2025-04-01 08:45
Comments