Sunday Times Teaser 2519
by Graham Smithers
Published: 2 January 2011 (link)
This week’s letters-for-digits Teaser has a Greek theme. All words in capitals are numbers that have been coded by consistently using different letters for different digits. Our story concerns the prime THALLO (goddess of spring buds), who was also good at sums, and produced:
ALPHA + BETA + GAMMA = OMEGA
What number is represented by OMEGA?
One Comment
Leave one →
-
Brian Gladman permalink123456789101112from number_theory import is_primefrom alphasum import AlphaSum# function to check that THALLO as a number is primefn = lambda r: is_prime(int(''.join(str(r[c]) for c in 'THALLO')))c = AlphaSum(['ALPHA', 'BETA', 'GAMMA'], 'OMEGA')for r in c.solve(fn=fn):print('OMEGA = {} ({})'.format(c.substitute(r, 'OMEGA'), c.output(r, fmt='{1:}')))