The Math Forum

Ask Dr. Math - Questions and Answers from our Archives
Associated Topics || Dr. Math Home || Search Dr. Math

The Number That Begins With 123454321

Date: 3 Apr 1995 10:20:19 -0400
From: Marek Kacprzak
Subject: Theory of Numbers

Dear Math Team!

Prove,that exists a value of n,which number 2^(n) 2 to power n
begins in decimal notation 123454321(just begins) and the rest of the
digits are whatever they want to be.It is only important the Begin of
the digits 123454321..............and here are different digits.........
And if exists the value of n then find it.

                                                        Marek Kacprzak

Date: 6 Apr 1995 00:30:30 -0400
From: Dr. Ken
Subject: Re: Theory of Numbers

Hello there!

Well, I've consulted with a fabulous professor (Professor Grinstead) around
here, and he showed me how he would attack this problem.  Here it is:

Let D = 1.23454321
Then we're looking for a value of n and a value of m such that 
D * 10^m  is less than  2^n  is less than  (D + 10^(-8)) * 10^m 

Does that make sense?  If it doesn't, think about it for a while, and if you
still can't get it, write us back.  Anyway, to solve that equation, take the
Log (base 10) of both sides:

Log{D} + m  is less than  n*Log{2}  is less than  Log{D + 10^(-8)} + m

Now subtract m from the inequality: the result will be something between 0
and 1, so in the middle we can use the fractional part of n*Log{2}, which
I'll denote by <n*Log{2}> (not the usual notation, but it'll work fine
here).  For example, <5.6> = .6 .

Log{D}  is less than  <n*Log{2}>  is less than  Log{D + 10^(-8)}

Now we use a theorem.  There's a theorem that says that if you have an
irrational number T, the sequence <T>, <2*T>, <3*T>, ... will be dense (in
fact, it will be uniformly distributed) in the interval from 0 to 1.
Therefore, there's GOING to be some value (in fact, infinitely many values)
of n in the required interval from Log{D} to Log{D + 10^(-8)}.  Furthermore,
if the length of the interval is L, a good value of 2^n (where the first 9
digits are 123454321) should occur about every 1/L terms, since the sequence
is uniformly distributed.  So in this case, we should get a good value of
2^n about every 10^8 values of n.  That's not too bad.  

To actually find a value of n that works, I don't know of any other way than
to use a computer to do a search.  I started a search that simply goes
through and checks each n one-by-one, and it didn't find any values of n
below 301731.  I'll let you know if it turns up anything.  There are other,
quicker ways to find an n, but the other ways my professor and I talked
about won't necessarily give you the smallest values of n for which the
condition is true.  If you're interested in those ways, let us know.

Thanks for the question!

-Ken "Dr." Math

Date: 7 Apr 1995 20:38:02 -0400
From: Dr. Ken
Subject: Re: Theory of Numbers

Hello there!

Well, the search has come up fruitful.  2^70279608 has as its first nine
digits 123454321.  To check it, I plugged the following input into
Mathematica, a computer program, to verify the result:

In[1]:= N[10^(N[70279608 * Log[10, 2], 11]), 11]

Out[1]= 1.23454321 10

Here's what all that means: N[a,b] means write a in scientific notation,
with b significant digits.  So basically I asked it what the number
10^(Log(2^70279608)) was, because computing 2^70279608 directly is too hard
for the machine.

I had significant computation help from a
fellow student here, Jeremy Dilatush, who is very good with quick computer
algorithms.  I just didn't want to forget to give credit where credit was

Anyway, I hope you enjoy this!

-Ken "Dr." Math
Associated Topics:
College Number Theory

Search the Dr. Math Library:

Find items containing (put spaces between keywords):
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

Math Forum Home || Math Library || Quick Reference || Math Forum Search

Ask Dr. MathTM
© 1994- The Math Forum at NCTM. All rights reserved.