Substrings in powers

Algebra Level 5

Let p 2 p \geq 2 be a natural number. For every natural number n n we define N p ( n ) N_p(n) as the smallest natural exponent k k such that p k p^k contains n n as a substring. If such exponent does not exist, we put N p ( n ) = N_p(n) = \infty .

For example, N 2 ( 28 ) = 7 N_2(\red{28}) = 7 , because 2 7 = 1 28 2^7 = 1\red{28} and all of the values 2 0 = 1 2^0 = 1 , 2 1 = 2 2^1 = 2 , 2 2 = 4 2^2 = 4 , 2 3 = 8 2^3 = 8 , 2 4 = 16 2^4 = 16 , 2 5 = 32 2^5 = 32 and 2 6 = 64 2^6 = 64 do not contain 28 28 as a substring.

What is the smallest natural number p 2 p \geq 2 such that N p ( n ) = N_p(n) = \infty , for some natural number n n ?

Problem inspired by this puzzle .

5 2 4 7 9 6 3 10

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.

2 solutions

Piotr Idzik
May 2, 2020

First we prove the following: If log 10 p \log_{10}p is an irrational number then N p ( n ) < N_p(n) < \infty for every n N n \in \N .

In order to prove it we will show that for every n N n \in \N there exists an exponent k 0 N k_0 \in \N , such that the value p k 0 p^{k_0} begins with n (i.e. the first digits of the number p k 0 p^{k_0} are the same as n n ).

Indeed, let n N n \in \N have the form d 1 d 2 d l d_1 d_2 \ldots d_l (for example, if n = 492 n = 492 , then d 1 = 4 d_1 = 4 , d 2 = 9 d_2 = 9 , d 3 = 2 d_3 = 2 , l = 3 l = 3 ). Note that, if α [ log 10 d 1 . d 2 d l , log 10 d 1 . d 2 d l 9 ) [ 0 , 1 ] \alpha \in \left[\log_{10} d_1.d_2 \ldots d_l, \log_{10}d_1.d_2 \ldots d_l 9 \right) \subseteq [0, 1] , then 1 0 α [ d 1 . d 2 d l , d 1 . d 2 d l 9 ) 10^\alpha \in \left[d_1.d_2 \ldots d_l, d_1.d_2 \ldots d_l 9 \right) (for example, if n = 492 n=492 , then d 1 . d 2 d 3 d_1.d_2d_3 represents 4.92 4.92 and d 1 . d 2 d 3 9 d_1.d_2d_3 9 represents 4.929 4.929 ). Consider the sequence ( { k log 10 p } ) k N \left( \{ k \log_{10}p \} \right)_{k \in \N} , where { x } \{ x \} denotes the fractional part of x x . Since the value log 10 p \log_{10}p is assumed to be irrational, then by the Equidistribution theorem , the sequence defined above is a dense subset of the interval [ 0 , 1 ] [0, 1] . Therefore, there exists k 0 N k_0 \in \N , such that { k 0 log 10 p } [ log 10 d 1 . d 2 d l , log 10 d 1 . ( d 2 d l + 1 ) ) \{k_0 \log_{10}p\} \in \left[\log_{10} d_1.d_2 \ldots d_l, \log_{10}d_1.(d_2 \ldots d_l+1) \right) . It remains to show that the value p k 0 p^{k_0} has the desired property. Calculate: p k 0 = 1 0 k 0 log 10 p = 1 0 k 0 log 10 p is of the form 10 0 1 0 { k 0 log 10 p } [ d 1 . d 2 d l , d 1 . d 2 d l 9 ) p^{k_0} = 10^{k_0 \log_{10}p} = \underbrace{10^{\lfloor k_0 \log_{10}p \rfloor}}_{\text{is of the form } 10\ldots0}\cdot \underbrace{10^{\{k_0 \log_{10}p\}}}_{\in \left[d_1.d_2 \ldots d_l, d_1.d_2 \ldots d_l 9 \right)} , which shows the claim.

In order to solve the puzzle, we need to determine the natural numbers p 2 p \geq 2 such that log 10 p \log_{10} p is an irrational number. We will show the following: log 10 p \log_{10} p is a rational number if and only if p p is a (natural) power of 10. Suppose that log 10 p = a b \log_{10}p = \frac{a}{b} , for some relatively prime integers a a and b b . W.l.o.g. we may assume, that a > 0 a > 0 and b > 0 b > 0 . We have that 1 0 a b = p 10^{\frac{a}{b}} = p , hence 1 0 a = p b 10^a = p^b and 2 a 5 a = p b 2^a 5^a = p^b . Therefore p = 2 r 5 s p = 2^r 5^s for some r , s N r, s \in \N . We have that 2 r b 5 s b = 2 a 5 a 2^{rb} 5^{sb} = 2^a5^a , thus a = r b = s b a = rb = sb , i.e. r = s r = s . Hence p = 2 r 5 r = 1 0 r p = 2^r 5^r = 10^r .

Therefore, all of the numbers log 10 2 , log 10 3 , , log 10 9 \log_{10} 2, \log_{10} 3, \ldots, \log_{10} 9 are irrational and log 10 10 = 1 N \log_{10}10 = 1 \in \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 ) (x, y) is highlighted if and only if x x is a substring of 2 y 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 .

Another explanation is to check the first 15 powers of 2:

2 1 = 2 2^1 = 2

2 2 = 4 2^2 = 4

2 3 = 8 2^3 = 8

2 4 = 16 2^4 = 16

2 5 = 32 2^5 = 32

2 6 = 64 2^6 = 64

2 7 = 128 2^7 = 128

2 8 = 256 2^8 = 256

2 9 = 512 2^9 = 512

2 10 = 1024 2^{10} = 1024

2 11 = 2048 2^{11} = 2048

2 12 = 4096 2^{12} = 4096

2 13 = 8192 2^{13} = 8192

2 14 = 16384 2^{14} = 16384

2 15 = 32768 2^{15} = 32768

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 20 = 1048576 2^{20} = 1048576 , therefore 10 could be considered as a substring in 2 20 2^{20} .)

There are few things in your solution on which I do not agree.

First of all 10 \textcolor{#D61F06}{10} is a substring of 2 10 = 10 24 2^{10} = \textcolor{#D61F06}{10}24 (actually N 2 ( 10 ) = 10 N_2(10) = 10 ).

The puzzle was about identifying a certain power base \textcolor{#D61F06}{\textit{power base}} p p , which does not generate all possible numbers as substrings. For example, if we take the powers of 10 10 : 1 0 0 = 1 , 1 0 1 = 10 , 1 0 2 = 100 , 1 0 3 = 1000 , 10^0 = 1, 10^1 = 10, 10^2 = 100, 10^3 = 1000, \ldots , we see that the only numbers, which we can find in these numbers are: 1 1 followed by some amount or zeros and 0 0 (we will never find 2 2 , 3 3 or other numbers; i.e. N 10 ( 2 ) = N 10 ( 3 ) = N_{10}(2) = N_{10}(3) = \infty ).

The question is: what will happen if we take p 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 2, 3, \ldots, 9 ?

Piotr Idzik - 1 year, 1 month ago

Log in to reply

Oops, sorry - forgot about 2^10!. But doesn't that mean no solution?

A Former Brilliant Member - 1 year, 1 month ago

Log in to reply

Let A = { p N : p 2 and N p ( n ) = for some n N } A = \{ p \in \N \colon p \geq 2 \text{ and } N_p(n) = \infty \text{ for some } n \in \N \} . The puzzle is about finding the value min A \min A . Note that 10 A 10 \in A , because N 10 ( 2 ) = N_{10}(2) = \infty . Therefore min A 10 \min A \leq 10 . In order to solve the puzzle, one needs to show that min A = 10 \min A = 10 .

Piotr Idzik - 1 year, 1 month ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...