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

Home > Probability
Probable Ten Power (Posted on 2009-10-06) Difficulty: 3 of 5
Determine the probability that for a positive base ten integer X drawn at random between 1 and 100 inclusively, the number 10X is expressible as the product of precisely two positive integers, neither of which contains the digit zero.

See The Solution Submitted by K Sengupta    
Rating: 4.5000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 2

The probability is 1/10 as there are 10 values of x that work: 1, 2, 3, 4, 5, 6, 7, 9, 18 and 33.

The program logic depends on the fact that neither factor chosen can have both 2 and 5 as factor within itself, and so they must be 2^x and 5^x.

list
   10   for X=1 to 100
   15    Y=10^X
   20    Dvr=2^X
   30    Q=5^X
   40    S=cutspc(str(Dvr)+str(Q))
   50    if instr(S,"0")=0 then
   60           :print X;Y;Dvr;Q
   70           :Ct=Ct+1
   90   next X
  100   print Ct
OK
run
 x  10^x  factors
 1  10  2  5
 2  100  4  25
 3  1000  8  125
 4  10000  16  625
 5  100000  32  3125
 6  1000000  64  15625
 7  10000000  128  78125
 9  1000000000  512  1953125
 18  1000000000000000000  262144  3814697265625
 33  1000000000000000000000000000000000  8589934592  116415321826934814453125
 10 (count of values)


 
 Increasing the limit beyond x=100, to the limit of UBASIC, shows no other possible values of x through 1549, so one can hypothesize that there are no more such values ever, but that's just that--a hypothesis:
 
list
   10   for X=1 to 2100
   15    Y=10^X
   20    Dvr=2^X
   30    Q=5^X
   40    S1=cutspc(str(Dvr)):S2=str(Q)
   50    if instr(S1,"0")=0 and instr(S2,"0")=0 then
   60           :print X;Y;Dvr;Q
   70           :Ct=Ct+1
   90   next X
  100   print Ct
OK
run
 1  10  2  5
 2  100  4  25
 3  1000  8  125
 4  10000  16  625
 5  100000  32  3125
 6  1000000  64  15625
 7  10000000  128  78125
 9  1000000000  512  1953125
 18  1000000000000000000  262144  3814697265625
 33  1000000000000000000000000000000000  8589934592  116415321826934814453125
Overflow in 40
?x
 1550


  Posted by Charlie on 2009-10-06 12:17:28
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
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