All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Ring in 2013 (Posted on 2012-12-31) Difficulty: 3 of 5
Start as you wish had you prove that for any k-digit number M there exists a number n such that the string of first k digits of 2n equals M.

Find a power of 2 whose decimal expansion begins with the 12-digit string "201320132013". It need not be the smallest such number.

Bonus: Find the smallest such number and prove it to be the smallest.

  Submitted by Charlie    
Rating: 4.0000 (1 votes)
Solution: (Hide)
The numbers are going to get very large, so we need to use logarithms. We're working in decimal, so we'll use common logarithms. As we're concerned with the first few digits, we need initially only concern ourselves with the mantissa, which must fall between that of log(201320132013) and that of log(201320132014), while of course keeping track of the power of two being used, which will eventually give us the full logarthm of the answer.

log(201320132013) = 11.303887206508027727833628963304376046154365279768309384363
log(201320132014) = 11.303887206510184961079800931733384468610983266563680769717

and the mantissas are of course the fractional parts of these.

log(2) = 0.30102999566398119521373889472449302676818988146210854131

which enables us to make up the following table:

 n        mantissa for log(2n)                             serial reference
 1 0.30102999566398119521373889472449302676818988146210854131  1
 3 -0.096910013008056414358783315826520919695430355613674376068  2
 10  0.010299956639811952137388947244930267681898814621085413106  3
 93 -0.004210403249748845122282790622148510558341024023905658112  4
 196  0.001879150140314261892823366000633246565216766573274096882  5
 485 -0.000452102969120321336636058620882017427907490877357464347  6
 2136  0.000070738263832976546279131517105176853586803063844239491  7
 13301 -0.000027673386122462058961269518250956306386672494292027398  8
 42039 -0.000012281894534409630604677037647692065573214419031842704  9
 70777  0.00000310959705364279775191544295557217524024365622834199  10
 325147  0.000000156493680161560402984734174596635387760205881525257  11
 6432163  0.000000020276549588410307779240536360532514960461402163156  12
 51132157  0.00000000571871654572205924919011628762473192348533577999  13
 198096465  0.000000002598316594477929217519928789966412733479940956806  14
 345060773 -0.000000000522083356766200814150258707691906456525453866377  15
 1923400330 -0.000000000012100189353074853231364748493119549147328375078  16
 82361153417  0.000000000001775214583982125201574522487765843190333738013  17
 578451474249  0.000000000000326312734800023179656908921241353185007791014  18
 2809896217828 -0.000000000000143650909982009303289977881559077265294782941  19
 6198243909905  0.000000000000039010914836004573076953158123198654418225131  20

In each case the next line's mantissa is found by dividing the previous mantissa into the one before that and taking the remainder. For example, for n=3 the mantissa is about -0.09691 and for n=10 it's about 0.01030; the quotient is closer to 9 than to 10, so we use 9. We take 9*0.0102999... and add the negative 0.09691.... The result is still negative and this is valid so long as we do the same to the values of n: 9*10+3 = 93, which is then the n value of the next line. The serial numbers on each line are merely for further reference.

Then for each successive one of these lines we try to get as close as possible to the midpoint between the two boundary mantissas: those of log(201320132013) and of log(201320132014), by adding in a multiple of the mantissa on that line.

The log(2) is a very good starting point for the mantissa we want. As shown on the first row of the below table, it leaves us off the goal by about 0.002857210845. That's close enough that we don't need to use the adjustments of reference numbers 2 or 3 as they are wider than the needed adjustment. The table contains paired lines. The first in each pair shows the amount of needed adjustment to the mantissa that remains. The second line in each pair shows the mantissa for the given reference-numbered line and the multiple of that that needs to be added. Not shown, but eventually counted, are the same multiples times the n (the power of 2 needed for the given reference number).


 0.002857210845125149242976052794387230614484391703886535729
-0.096910013008056414358783315826520919695430355613674376068     0  2

 0.002857210845125149242976052794387230614484391703886535729
 0.010299956639811952137388947244930267681898814621085413106     0  3

 0.002857210845125149242976052794387230614484391703886535729
-0.004210403249748845122282790622148510558341024023905658112    -1  4

-0.001353192404623695879306737827761279943856632320019122382
 0.001879150140314261892823366000633246565216766573274096882    -1  5

 0.000525957735690566013516628172871966621360134253254974499
-0.000452102969120321336636058620882017427907490877357464347    -1  6

 0.000073854766570244676880569551989949193452643375897510152
 0.000070738263832976546279131517105176853586803063844239491     1  7

 0.00000311650273726813060143803488477233986584031205327066
-0.000027673386122462058961269518250956306386672494292027398     0  8

 0.00000311650273726813060143803488477233986584031205327066
-0.000012281894534409630604677037647692065573214419031842704     0  9

 0.00000311650273726813060143803488477233986584031205327066
 0.00000310959705364279775191544295557217524024365622834199      1  10

 0.00000000690568362533284952259192920016462559665582492867
 0.000000156493680161560402984734174596635387760205881525257     0  11

 0.00000000690568362533284952259192920016462559665582492867
 0.000000020276549588410307779240536360532514960461402163156     0  12

 0.00000000690568362533284952259192920016462559665582492867
 0.00000000571871654572205924919011628762473192348533577999      1  13

 0.000000001186967079610790273401812912539893673170489148679
 0.000000002598316594477929217519928789966412733479940956806     0  14

 0.000000001186967079610790273401812912539893673170489148679
-0.000000000522083356766200814150258707691906456525453866377    -2  15

 0.000000000142800366078388645101295497156080760119581415925
-0.000000000012100189353074853231364748493119549147328375078    -12  16

-0.000000000002401906158509593675081484761353829648359085013
 0.000000000001775214583982125201574522487765843190333738013    -1  17

-0.000000000000626691574527468473506962273587986458025346999
 0.000000000000326312734800023179656908921241353185007791014    -2  18

 0.000000000000025933895072577885806855568894719911990235028
-0.000000000000143650909982009303289977881559077265294782941     0  19

 0.000000000000025933895072577885806855568894719911990235028
 0.000000000000039010914836004573076953158123198654418225131     1  20

The total n value is given by:

Initial 					      1
Ref  4	  -1 *              93	=	    -93
Ref  5	  -1 *	          196	=	   -196
Ref  6	  -1 *             485	=           -485
Ref  7	   1 *            2136	=	   2136
Ref 10	   1 *	        70777	=          70777
Ref 13	   1 *	     51132157	=       51132157
Ref 15	  -2 *	    345060773	=     -690121546
Ref 16	 -12 *	   1923400330	=   -23080803960
Ref 17	  -1 *	  82361153417	=   -82361153417
Ref 18	  -2 *	 578451474249	= -1156902948498
Ref 20	   1 *	6198243909905	=  6198243909905
				   -------------
				   4935260086781

The adjusted mantissa was actually acurate enough at level 18, but the total of the multiplied n's was negative, making the total power of 2 negative, giving the resulting logarithm's characteristic that negative value, making the resulting power look something like 0.000...000201320132013..., rather than the integer we seek, so the process was continued until a positive power of 2 was achieved.

At that point the power of 2 came out to 4935260086781.

log(2) ~= 0.30102999566398119521373889472449302676818988146210854131

4935260086781*log(2) ~= 1485661322524.30388720650911942147647837420615035497190275

10.30388720650911942147647837420615035497190275 ~= 2.0132013201350606194058305598359624115026835178

So 24935260086781 ~= 2.0132013201350606194058305598359624115026835178 x 101485661322524, found by use of extra-precision in UBASIC.

Comments: ( You must be logged in to post comments.)
  Subject Author Date
Hints/TipsHintCharlie2013-01-05 12:18:21
Hints/Tipsre(3): 'Slide Rule' LogicCharlie2013-01-02 12:09:36
re(2): 'Slide Rule' Logicbroll2013-01-02 01:48:36
re: 'Slide Rule' LogicCharlie2013-01-01 03:30:07
Some Thoughts'Slide Rule' Logicbroll2012-12-31 17:16:15
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information