This table lists the number of solutions for the equation labeled in the header of each column shown, for each base.
base
NULL ONE FOUR FIVE SIX NINE
5 0 0 0 0 0 0
6 0 1 0 0 0 0
7 0 1 1 0 5 0
8 1 4 2 3 6 1
9 1 9 4 12 25 2
10 4 12 6 15 42 3
11 6 18 14 48 101 3
12 8 21 16 79 154 10
13 10 36 19 140 225 13
14 14 37 29 197 300 16
15 18 53 37 312 476 13
16 24 61 45 412 582 25
17 28 68 60 568 831 30
18 33 82 64 723 977 35
19 39 102 78 965 1312 32
20 46 104 95 1202 1552 50
21 52 133 101 1508 1969 56
22 61 145 116 1789 2222 64
23 69 160 144 2218 2844 57
24 77 173 151 2628 3204 81
25 85 209 168 3108 3867 91
SIX has the most base-10 solutions, 42.
ONE has a unique base-6 solution. ONE and FOUR have unique solutions in base 7. NULL and NINE have unique solutions in base 8, as does NULL in base 9.
DEFDBL A-Z
DIM used(30)
DIM stats(25, 6)
FOR b = 5 TO 25
PRINT b;
FOR t = 1 TO b - 1
used(t) = 1
FOR w = 1 TO b - 1
IF used(w) = 0 THEN
used(w) = 1
FOR o = 1 TO b - 1
IF used(o) = 0 THEN
used(o) = 1
two = t * b * b + w * b + o
two2 = two + two
FOR s1 = 1 TO b - 1
IF used(s1) = 0 THEN
used(s1) = 1
FOR s2 = 1 TO b - 1
IF used(s2) = 0 THEN
used(s2) = 1
one = o * b * b + s1 * b + s2
IF o > 0 THEN
IF two2 = one THEN
stats(b, 2) = stats(b, 2) + 1
END IF
END IF
FOR s3 = 1 TO b - 1
IF used(s3) = 0 AND b > 5 THEN
used(s3) = 1
null = s1 * b * b * b + s2 * b * b + s3 * b + s3
IF s1 > 0 THEN
IF two2 = null THEN
stats(b, 1) = stats(b, 1) + 1
END IF
END IF
four = s1 * b * b * b + o * b * b + s2 * b + s3
IF s1 > 0 THEN
IF two2 = four THEN
stats(b, 3) = stats(b, 3) + 1
END IF
END IF
six = s1 * b * b + s2 * b + s3
IF s1 > 0 THEN
IF two2 = six THEN
stats(b, 5) = stats(b, 5) + 1
END IF
END IF
nine = s1 * b * b * b + s2 * b * b + s1 * b + s3
IF s1 > 0 THEN
IF two2 = nine THEN
stats(b, 6) = stats(b, 6) + 1
END IF
END IF
FOR s4 = 1 TO b - 1
IF used(s4) = 0 AND b > 6 THEN
used(s4) = 1
five = s1 * b * b * b + s2 * b * b + s3 * b + s4
IF s1 > 0 THEN
IF two2 = five THEN
stats(b, 4) = stats(b, 4) + 1
END IF
END IF
used(s4) = 0
END IF
NEXT s4
used(s3) = 0
END IF
NEXT s3
used(s2) = 0
END IF
NEXT s2
used(s1) = 0
END IF
NEXT s1
used(o) = 0
END IF
NEXT o
used(w) = 0
END IF
NEXT w
used(t) = 0
NEXT t
NEXT b
PRINT : PRINT
FOR b = 5 TO 25
PRINT USING "##"; b;
FOR i = 1 TO 6
PRINT USING "####"; stats(b, i);
NEXT
PRINT
NEXT
|
Posted by Charlie
on 2010-04-11 22:33:28 |