Substitute each of the capital letters by a different base six digit from 0 to 5 to satisfy the following set of alphametic relationships. None of the numbers can contain any leading zero.
- The base six number ICUS is a perfect square, and:
- A is a perfect square, and:
- The base six number MI is a perfect fifth power, and:
- The base six number US is a perfect square.
Determine the value assumed by the base six number
AMICUS.
FOR i = 0 TO 5
used(i) = 1
FOR c = 0 TO 5
IF used(c) = 0 THEN
used(c) = 1
FOR u = 0 TO 5
IF used(u) = 0 THEN
used(u) = 1
FOR s = 0 TO 5
IF used(s) = 0 THEN
used(s) = 1
FOR a = 0 TO 5
IF used(a) = 0 THEN
used(a) = 1
FOR m = 0 TO 5
IF used(m) = 0 THEN
used(m) = 1
sr = INT(SQR(a) + .5)
IF sr * sr = a THEN
icus = i * 216 + c * 36 + u * 6 + s
sr = INT(SQR(icus) + .5)
IF sr * sr = icus THEN
mi = m * 6 + i
fifth = INT(mi ^ (1 / 5) + .5)
IF fifth * fifth * fifth * fifth * fifth = mi THEN
us = u * 6 + s
sr = INT(SQR(us) + .5)
IF sr * sr = us THEN
PRINT i; c; u; s, a, m; i, u; s
PRINT icus, a, mi, us
PRINT
amicus = (36 * a + 6 * m + i) * 216 + c * 36 + u * 6 + s
PRINT a; m; i; c; u; s
PRINT amicus
END IF
END IF
END IF
END IF
used(m) = 0
END IF
NEXT
used(a) = 0
END IF
NEXT
used(s) = 0
END IF
NEXT
used(u) = 0
END IF
NEXT
used(c) = 0
END IF
NEXT
used(i) = 0
NEXT
gives
2 0 1 3 4 5 2 1 3
441 4 32 9
4 5 2 0 1 3
38025
meaning ICUS is 2013 or decimal 441, A is 4, MI is 52 or decimal 32, and US is 13 or decimal 9; AMICUS is 452013 or decimal 38025.
|
Posted by Charlie
on 2009-09-13 14:35:09 |