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

Home > Probability
Some digits sum square II (Posted on 2011-10-29) Difficulty: 3 of 5
Determine the probability that for a positive integer N drawn at random between 3 and 202 inclusively, the sum of the digits in the base ten representation of 2011 (base N) is a perfect square.

No Solution Yet Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution Comment 1 of 1
N               digits                sum  sq root
3             2  2  0  2  1  1  1     9     3
8             3  7  3  3              16    4
10            2  0  1  1              4     2
20            5  0  11                16    4
22            4  3  9                 16    4
26            2  25  9                36    6
60            33  31                  64    8
80            25  11                  36    6
92            21  79                  100   10
106           18  103                 121   11
110           18  31                  49    7
127           15  106                 121   11
134           15  1                   16    4
136           14  107                 121   11
148           13  87                  100   10
178           11  53                  64    8
190           10  111                 121   11
194           10  71                  81    9

There are 18 bases out of the 200, so the probability is 9%.

DEFDBL A-Z
CLS

FOR n = 3 TO 202
  digs = 0
  num = 2011
  tot = 0
  DO
    d = num MOD n
    tot = tot + d
    num = num \ n
    dig(digs) = d
    digs = digs + 1
  LOOP UNTIL num = 0
  sr = INT(SQR(tot) + .5)
  IF sr * sr = tot THEN
    PRINT n,
    FOR i = digs - 1 TO 0 STEP -1
      PRINT dig(i);
    NEXT
    PRINT TAB(39); tot; TAB(45); sr
    ct = ct + 1
  END IF
NEXT n
PRINT ct


  Posted by Charlie on 2011-10-29 14:12:01
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 (4)
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