DEFDBL A-Z
FOR b = 5 TO 16
REDIM used(b)
FOR o = 1 TO b - 1
used(o) = 1
FOR d = 0 TO b - 1
IF used(d) = 0 THEN
odd = o * b * b + d * (b + 1)
odd2 = 2 * odd
used(d) = 1
FOR e = 1 TO b - 1
IF used(e) = 0 THEN
used(e) = 1
FOR v = 0 TO b - 1
IF used(v) = 0 THEN
used(v) = 1
FOR n = 0 TO b - 1
IF used(n) = 0 THEN
used(n) = 1
even = e * (b * b * b + b) + v * b * b + n
IF odd2 = even THEN
PRINT b, o; d; d, e; v; e; n, odd; even
END IF
used(n) = 0
END IF
NEXT
used(v) = 0
END IF
NEXT
used(e) = 0
END IF
NEXT
used(d) = 0
END IF
NEXT
used(o) = 0
NEXT
NEXT
finds
decimal
b O D D E V E N odd even
8 5 4 4 1 3 1 0 356 712
8 6 4 4 1 5 1 0 420 840
10 6 5 5 1 3 1 0 655 1310
10 8 5 5 1 7 1 0 855 1710
12 7 6 6 1 3 1 0 1086 2172
12 8 6 6 1 5 1 0 1230 2460
12 9 6 6 1 7 1 0 1374 2748
12 10 6 6 1 9 1 0 1518 3036
14 8 7 7 1 3 1 0 1673 3346
14 9 7 7 1 5 1 0 1869 3738
14 11 7 7 1 9 1 0 2261 4522
14 12 7 7 1 11 1 0 2457 4914
16 9 8 8 1 3 1 0 2440 4880
16 10 8 8 1 5 1 0 2696 5392
16 11 8 8 1 7 1 0 2952 5904
16 12 8 8 1 9 1 0 3208 6416
16 13 8 8 1 11 1 0 3464 6928
16 14 8 8 1 13 1 0 3720 7440
The string 1310 is valid for EVEN in each base in which there is a solution, even though the string for ODD is different in each of these bases.
It even works beyond base 16:
18 10 9 9 1 3 1 0 3411 6822
18 11 9 9 1 5 1 0 3735 7470
18 12 9 9 1 7 1 0 4059 8118
18 14 9 9 1 11 1 0 4707 9414
18 15 9 9 1 13 1 0 5031 10062
18 16 9 9 1 15 1 0 5355 10710
20 11 10 10 1 3 1 0 4610 9220
20 12 10 10 1 5 1 0 5010 10020
20 13 10 10 1 7 1 0 5410 10820
20 14 10 10 1 9 1 0 5810 11620
20 15 10 10 1 11 1 0 6210 12420
20 16 10 10 1 13 1 0 6610 13220
20 17 10 10 1 15 1 0 7010 14020
20 18 10 10 1 17 1 0 7410 14820
22 12 11 11 1 3 1 0 6061 12122
22 13 11 11 1 5 1 0 6545 13090
22 14 11 11 1 7 1 0 7029 14058
22 15 11 11 1 9 1 0 7513 15026
22 17 11 11 1 13 1 0 8481 16962
22 18 11 11 1 15 1 0 8965 17930
22 19 11 11 1 17 1 0 9449 18898
22 20 11 11 1 19 1 0 9933 19866
24 13 12 12 1 3 1 0 7788 15576
24 14 12 12 1 5 1 0 8364 16728
24 15 12 12 1 7 1 0 8940 17880
24 16 12 12 1 9 1 0 9516 19032
24 17 12 12 1 11 1 0 10092 20184
24 18 12 12 1 13 1 0 10668 21336
24 19 12 12 1 15 1 0 11244 22488
24 20 12 12 1 17 1 0 11820 23640
24 21 12 12 1 19 1 0 12396 24792
24 22 12 12 1 21 1 0 12972 25944
26 14 13 13 1 3 1 0 9815 19630
26 15 13 13 1 5 1 0 10491 20982
26 16 13 13 1 7 1 0 11167 22334
26 17 13 13 1 9 1 0 11843 23686
26 18 13 13 1 11 1 0 12519 25038
26 20 13 13 1 15 1 0 13871 27742
26 21 13 13 1 17 1 0 14547 29094
26 22 13 13 1 19 1 0 15223 30446
26 23 13 13 1 21 1 0 15899 31798
26 24 13 13 1 23 1 0 16575 33150
28 15 14 14 1 3 1 0 12166 24332
28 16 14 14 1 5 1 0 12950 25900
28 17 14 14 1 7 1 0 13734 27468
28 18 14 14 1 9 1 0 14518 29036
28 19 14 14 1 11 1 0 15302 30604
28 20 14 14 1 13 1 0 16086 32172
28 21 14 14 1 15 1 0 16870 33740
28 22 14 14 1 17 1 0 17654 35308
28 23 14 14 1 19 1 0 18438 36876
28 24 14 14 1 21 1 0 19222 38444
28 25 14 14 1 23 1 0 20006 40012
28 26 14 14 1 25 1 0 20790 41580
30 16 15 15 1 3 1 0 14865 29730
30 17 15 15 1 5 1 0 15765 31530
30 18 15 15 1 7 1 0 16665 33330
30 19 15 15 1 9 1 0 17565 35130
30 20 15 15 1 11 1 0 18465 36930
30 21 15 15 1 13 1 0 19365 38730
30 23 15 15 1 17 1 0 21165 42330
30 24 15 15 1 19 1 0 22065 44130
30 25 15 15 1 21 1 0 22965 45930
30 26 15 15 1 23 1 0 23865 47730
30 27 15 15 1 25 1 0 24765 49530
30 28 15 15 1 27 1 0 25665 51330
32 17 16 16 1 3 1 0 17936 35872
32 18 16 16 1 5 1 0 18960 37920
32 19 16 16 1 7 1 0 19984 39968
32 20 16 16 1 9 1 0 21008 42016
32 21 16 16 1 11 1 0 22032 44064
32 22 16 16 1 13 1 0 23056 46112
32 23 16 16 1 15 1 0 24080 48160
32 24 16 16 1 17 1 0 25104 50208
32 25 16 16 1 19 1 0 26128 52256
32 26 16 16 1 21 1 0 27152 54304
32 27 16 16 1 23 1 0 28176 56352
32 28 16 16 1 25 1 0 29200 58400
32 29 16 16 1 27 1 0 30224 60448
32 30 16 16 1 29 1 0 31248 62496
Edited on February 20, 2011, 4:34 pm
|
Posted by Charlie
on 2011-02-20 16:33:02 |