Guest Posted March 16, 2010 Report Share Posted March 16, 2010 For a positive integer N drawn at random between 2 (base ten) and 2001 (base ten) inclusively, determine the probability that the product of the digits in the base-N representation of 2009 (base ten) is equal to 18 (base ten). Quote Link to comment Share on other sites More sharing options...
0 superprismatic Posted March 16, 2010 Report Share Posted March 16, 2010 The probability is 0.002 = 4/2000. The possibilities are: base | representation of 2009 in the base 4 | 133121 223 | 92 1000 | 29 1991 | 1I Quote Link to comment Share on other sites More sharing options...
0 Guest Posted March 16, 2010 Report Share Posted March 16, 2010 (edited) 1/250, I believe. Conditions are satisfied for N = 4, 223, 1000, or 1991. 20094 = 133121 2009223 = 92 20091000 = 29 20091991 = 1I (1 18) I first solved this programatically as follows: data work.test; do n=2 to 2001; /*For each desired base (base n)*/ length BASE_N_2009 $100.; length digit_c $4.; BASE_N_2009 = ''; remaining = 2009; /*The number we want to find in our current base*/ power = 0; /*The last digit represents the base to the 0th power*/ dp = 1; /*Start the digital product at 1*/ do while (remaining > 0); /*Figure out the digits in base n one by one*/ digit = mod(remaining,n**(power+1))/(n**power); /*Figure out the rightmost unknown digit.*/ dp = dp*digit; /*Multiply the digital product by that digit*/ digit_c = strip(put(digit,$4.)); /*Convert to character*/ BASE_N_2009 = strip(digit_c) || ' ' || BASE_N_2009; /*Append the rest of the known digits onto the newly found digit*/ remaining = remaining - digit*(n**power); /*Decrement the remaining part of our number*/ power + 1; /*Move onto the next digit*/ end; drop digit digit_c power remaining; output; end; run; data work.test; set work.test; where dp=18; run; proc print data=work.test noobs run; Results: The SAS System 15:31 Tuesday, March 16, 2010 2 n BASE_N_2009 dp 4 1 3 3 1 2 1 18 223 9 2 18 1000 2 9 18 1991 1 18 18 Basically, I brute forced the solutions for anything with 4 or more digits in base N (up through base 12), stopping when a digit was anything other than a factor of 18. Trying all the possibilities (only 6 in total) where two digits could have a product of 18 and could be equal to 200910 in an integer base yielded the last three results. Now to show that there are no desirable solutions if 200910 has 3 digits in base N. Suppose that such a solution, when 2009 has 3 digits in base N, exists. Then there must be a solution for AN2 + BN + C = 2009, where A, B, C, and N are positive integers, and A, B, and C are all factors of 18. Let the factors of AN2 + BN + C = (RN+K1)(SN+K2) for positive integers R, S, N, K1, and K2, and RS = A, and K1*K2 = C, where C is a factor of 18. Thus, K1 and K2 are also factors of 18. In the same way, as RS = A, R and S must be factors of 18. This means that the factors of AN2 + BN + C = 2009 are also factors of 18. This cannot be true, as GCF(18,2009) = 1, so 2009 cannot have 3 digits in base N under our conditions. Edited March 16, 2010 by Chuck Quote Link to comment Share on other sites More sharing options...
Question
Guest
For a positive integer N drawn at random between 2 (base ten) and 2001 (base ten) inclusively, determine the probability that the product of the digits in the base-N representation of 2009 (base ten) is equal to 18 (base ten).
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.