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

 2011 = Sum of Squares II (Posted on 2011-07-19)
For a positive integer N drawn at random between 3 and 202 inclusively, determine the probability that the base N number 2011 is expressible as the sum of squares of two distinct positive integers in at least one way.

 No Solution Yet Submitted by K Sengupta No Rating

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

In 58 out of the 200 cases, or 29%, does the desired result hold:

`-----------------------decimal notation-----------base N        squares                     roots3             9  49                       3  78             9  1024                     3  3212            1444  2025                  38  4516            3025  5184                  55  7219            49  13689                   7  11720            3025  12996                 55  11424            12544  15129                112  12327            1369  38025                 37  19528            17689  26244                133  16229            9604  39204                 98  19833            10404  61504                102  24836            324  93025                  18  30544            56169  114244               237  33848            2209  219024                47  46849            21904  213444               148  46252            26244  255025               162  50556            43264  308025               208  55559            17689  393129               133  62764            173889  350464              417  59268            247009  381924              497  61875            303601  540225              551  73576            40804  837225               202  91583            13689  1129969              117  106384            23409  1162084              153  107888            170569  1192464             413  109291            60025  1447209              245  120392            632025  925444              795  96293            26244  1582564              162  1258100           112225  1887876             335  1374107           7225  2442969               85  1563113           2704  2883204               52  1698117           6400  3196944               80  1788120           176400  3279721             420  1811125           181476  3724900             426  1930128           262144  3932289             512  1983129           324  4293184                18  2072131           950625  3545689             975  1883133           5184  4700224               72  2168139           804609  4566769             897  2137140           335241  5152900             579  2270145           45796  6051600              214  2460147           38025  6315169              195  2513148           223729  6260004             473  2502152           1440000  5583769            1200  2363157           2160900  5579044            1470  2362160           463761  7728400             681  2780161           2196324  6150400            1482  2480163           613089  8048569             783  2837168           769129  8714304             877  2952176           5071504  5832225            2252  2415180           1069156  10595025           1034  3255181           5569600  6290064            2360  2508184           369664  12089529            608  3477187           1265625  11812969           1125  3437188           3790809  9498724            1947  3082189           3755844  9746884            1938  3122196           82369  14976900             287  3870197           7225344  8065600            2688  2840`

DEFDBL A-Z
CLS
FOR n = 3 TO 202
v = 2 * n * n * n + n + 1
sr1 = 1: sq1 = 1: found = 0
DO
r = v - sq1
sr = INT(SQR(r) + .5)
IF sr * sr = r THEN
found = 1
EXIT DO
END IF
sr1 = sr1 + 1
sq1 = sr1 * sr1
LOOP UNTIL sq1 > v / 2
IF found = 1 AND sq1 <> r THEN
ctHit = ctHit + 1
PRINT n, sq1; r, sr1; sr
IF ctHit MOD 40 = 0 THEN
DO: LOOP UNTIL INKEY\$ > "": PRINT
END IF
END IF
ct = ct + 1
NEXT n
PRINT
PRINT ctHit; ct, ctHit / ct

 Posted by Charlie on 2011-07-19 18:47:32

 Search: Search body:
Forums (2)