For what bases
P do this
alphametic equation possess at least one solution?
(
HE)
base P*(
HE)
base P = (
SHE)
base P
Prove that there are no others.
Extra Challenge: A solution without computer program aided method.
DEFDBL A-Z
CLS
OPEN "alphametic base.txt" FOR OUTPUT AS #2
FOR p = 3 TO 1000
FOR h = 1 TO p - 1
FOR e = 0 TO p - 1
IF e <> h THEN
he = p * h + e
she = he * he
s = INT(she / (p * p))
r = she - s * p * p
IF r = he THEN
IF s > 0 AND s < p THEN
IF s <> h AND s <> e THEN
PRINT p, s; h; e
PRINT #2, p, s; h; e
END IF
END IF
END IF
END IF
NEXT
NEXT
NEXT
CLOSE
finds
digits
base S H E
6 2 1 3
10 6 2 5
14 12 3 7
24 7 2 16
28 3 1 21
30 11 3 10
35 2 1 15
36 5 2 9
51 32 5 34
57 40 6 19
60 14 3 45
68 18 4 17
78 75 8 52
90 13 3 55
92 33 5 69
99 6 2 45
100 39 6 25
102 8 2 85
114 10 3 19
120 23 4 96
124 60 7 93
130 27 5 26
132 68 8 33
156 95 9 117
160 41 6 65
164 105 10 41
188 138 11 141
195 12 3 91
196 150 12 49
204 2 1 85
210 34 5 175
215 74 8 130
220 189 13 165
222 38 6 37
228 203 14 57
245 96 9 196
248 15 3 217
252 248 15 189
255 104 10 51
264 17 4 33
275 186 13 176
285 130 11 115
308 158 12 176
318 78 8 265
323 20 4 153
330 84 9 55
336 47 6 288
340 185 13 205
350 51 7 50
360 316 17 280
369 332 18 82
370 219 14 296
378 238 15 162
380 231 15 76
390 3 1 286
410 269 16 165
426 140 11 355
438 148 12 73
455 116 10 351
462 450 21 99
464 161 12 320
465 346 18 280
468 69 8 144
483 30 5 231
490 24 4 441
495 392 19 396
504 62 7 441
505 408 20 101
510 26 5 51
520 66 8 65
534 220 14 445
535 458 21 215
546 230 15 91
561 86 9 154
590 557 23 355
598 414 20 208
620 615 24 496
630 93 9 406
630 242 15 351
642 318 17 535
646 5 2 153
654 330 18 109
660 21 4 385
660 476 21 540
671 492 22 122
675 42 6 325
679 192 13 582
688 585 24 129
693 200 14 99
720 79 8 640
738 83 9 82
742 129 11 266
750 434 20 625
760 141 11 665
762 448 21 127
770 162 12 561
776 147 12 97
828 418 20 369
837 638 25 217
846 825 28 612
852 35 5 781
858 154 12 352
858 568 23 715
870 584 24 145
876 37 6 73
897 184 13 507
899 56 7 435
910 29 5 351
966 720 26 805
978 738 27 163
980 6 2 441
990 98 9 891
Each digit is displayed as decimal coded, as are the bases.
There doesn't seem to be a hint of running out of bases.
|
Posted by Charlie
on 2014-02-07 14:13:01 |