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

Home > Probability
Sum Digit Concern (Posted on 2010-03-13) Difficulty: 3 of 5
For a positive integer P drawn at random between 2 (base ten) and 2001 (base ten) inclusively, determine the probability that the sum of the digits in the base-P representation of 2009 (base ten) is equal to 11 (base ten).

No Solution Yet Submitted by K Sengupta    
Rating: 3.0000 (1 votes)

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

    LASTYEAR = 2009

    FOR p = 2 TO 2001

        total = total + 1

        baseP$ = Base$(LASTYEAR, p)
        digitSum = SumDigits(baseP$)

        IF digitSum = 11 THEN
            count = count + 1
            PRINT p, baseP$
        END IF

    NEXT p

    PRINT
    PRINT count, total, count/total

    END

This code produced the following output:

4             133121
7             5600
10            2009
223           92
334           65
667           38
1000          29
1999          1A

8             2000          0.004

Therefore the probability is 0.4% (if we allow A to represent 10 for base 1999).


  Posted by Jim Keneipp on 2010-03-13 12:54: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 (1)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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