Let p ≥ 2 be a natural number. For every natural number n we define N p ( n ) as the smallest natural exponent k such that p k contains n as a substring. If such exponent does not exist, we put N p ( n ) = ∞ .
For example, N 2 ( 2 8 ) = 7 , because 2 7 = 1 2 8 and all of the values 2 0 = 1 , 2 1 = 2 , 2 2 = 4 , 2 3 = 8 , 2 4 = 1 6 , 2 5 = 3 2 and 2 6 = 6 4 do not contain 2 8 as a substring.
What is the smallest natural number p ≥ 2 such that N p ( n ) = ∞ , for some natural number n ?
Problem inspired by this puzzle .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Another explanation is to check the first 15 powers of 2:
2 1 = 2
2 2 = 4
2 3 = 8
2 4 = 1 6
2 5 = 3 2
2 6 = 6 4
2 7 = 1 2 8
2 8 = 2 5 6
2 9 = 5 1 2
2 1 0 = 1 0 2 4
2 1 1 = 2 0 4 8
2 1 2 = 4 0 9 6
2 1 3 = 8 1 9 2
2 1 4 = 1 6 3 8 4
2 1 5 = 3 2 7 6 8
After 15 powers, 10 is the only number that in these first 15 powers that is not a substring of these powers. Therefore, 10 is the answer. ( 2 2 0 = 1 0 4 8 5 7 6 , therefore 10 could be considered as a substring in 2 2 0 .)
There are few things in your solution on which I do not agree.
First of all 1 0 is a substring of 2 1 0 = 1 0 2 4 (actually N 2 ( 1 0 ) = 1 0 ).
The puzzle was about identifying a certain power base p , which does not generate all possible numbers as substrings. For example, if we take the powers of 1 0 : 1 0 0 = 1 , 1 0 1 = 1 0 , 1 0 2 = 1 0 0 , 1 0 3 = 1 0 0 0 , … , we see that the only numbers, which we can find in these numbers are: 1 followed by some amount or zeros and 0 (we will never find 2 , 3 or other numbers; i.e. N 1 0 ( 2 ) = N 1 0 ( 3 ) = ∞ ).
The question is: what will happen if we take p , which is smaller than 10? Is it true, that we will find all the numbers as substring in the powers of 2 , 3 , … , 9 ?
Log in to reply
Oops, sorry - forgot about 2^10!. But doesn't that mean no solution?
Log in to reply
Let A = { p ∈ N : p ≥ 2 and N p ( n ) = ∞ for some n ∈ N } . The puzzle is about finding the value min A . Note that 1 0 ∈ A , because N 1 0 ( 2 ) = ∞ . Therefore min A ≤ 1 0 . In order to solve the puzzle, one needs to show that min A = 1 0 .
Problem Loading...
Note Loading...
Set Loading...
First we prove the following: If lo g 1 0 p is an irrational number then N p ( n ) < ∞ for every n ∈ N .
In order to prove it we will show that for every n ∈ N there exists an exponent k 0 ∈ N , such that the value p k 0 begins with n (i.e. the first digits of the number p k 0 are the same as n ).
Indeed, let n ∈ N have the form d 1 d 2 … d l (for example, if n = 4 9 2 , then d 1 = 4 , d 2 = 9 , d 3 = 2 , l = 3 ). Note that, if α ∈ [ lo g 1 0 d 1 . d 2 … d l , lo g 1 0 d 1 . d 2 … d l 9 ) ⊆ [ 0 , 1 ] , then 1 0 α ∈ [ d 1 . d 2 … d l , d 1 . d 2 … d l 9 ) (for example, if n = 4 9 2 , then d 1 . d 2 d 3 represents 4 . 9 2 and d 1 . d 2 d 3 9 represents 4 . 9 2 9 ). Consider the sequence ( { k lo g 1 0 p } ) k ∈ N , where { x } denotes the fractional part of x . Since the value lo g 1 0 p is assumed to be irrational, then by the Equidistribution theorem , the sequence defined above is a dense subset of the interval [ 0 , 1 ] . Therefore, there exists k 0 ∈ N , such that { k 0 lo g 1 0 p } ∈ [ lo g 1 0 d 1 . d 2 … d l , lo g 1 0 d 1 . ( d 2 … d l + 1 ) ) . It remains to show that the value p k 0 has the desired property. Calculate: p k 0 = 1 0 k 0 lo g 1 0 p = is of the form 1 0 … 0 1 0 ⌊ k 0 lo g 1 0 p ⌋ ⋅ ∈ [ d 1 . d 2 … d l , d 1 . d 2 … d l 9 ) 1 0 { k 0 lo g 1 0 p } , which shows the claim.
In order to solve the puzzle, we need to determine the natural numbers p ≥ 2 such that lo g 1 0 p is an irrational number. We will show the following: lo g 1 0 p is a rational number if and only if p is a (natural) power of 10. Suppose that lo g 1 0 p = b a , for some relatively prime integers a and b . W.l.o.g. we may assume, that a > 0 and b > 0 . We have that 1 0 b a = p , hence 1 0 a = p b and 2 a 5 a = p b . Therefore p = 2 r 5 s for some r , s ∈ N . We have that 2 r b 5 s b = 2 a 5 a , thus a = r b = s b , i.e. r = s . Hence p = 2 r 5 r = 1 0 r .
Therefore, all of the numbers lo g 1 0 2 , lo g 1 0 3 , … , lo g 1 0 9 are irrational and lo g 1 0 1 0 = 1 ∈ N .
As a side remark, I check how easy or hard it is to find the given number as a substring of a power of 2. On the graphic below, the point ( x , y ) is highlighted if and only if x is a substring of 2 y .
Feel free to use my python code for some further experiments. If you are looking for some more elaborated code, please have a look here .