Sunday Times Teaser 2495 – No Title
by Graham Smithers
Published July 18 2010 (link)
I have taken some numbers and consistently replaced the digits by letters, with different letters for different digits, in this way:
FOUR is a perfect square;
EIGHT is a perfect cube;
ONE + TEN is a prime.
What is the value of THREE?
One Comment
Leave one →
-
Brian Gladman permalink12345678910111213141516171819from number_theory import is_primefor ei in range(22, 47):E, I, G, H, T = (int(x) for x in str(ei ** 3))s1 = {E, I, G, H, T}if len(s1) == 5:for fr in range(32, 100):F, O, U, R = (int(x) for x in str(fr ** 2))s2 = {F, O, U, R}if len(s2) == 4 and not s1 & s2:N, = set(range(10)) - (s1 | s2)one = 100 * O + 10 * N + Eten = 100 * T + 10 * E + Nif is_prime(one + ten):three = 10000 * T + 1000 * H + 100 * R + 11 * Eprint(f'THREE = {three} (FOUR = {fr ** 2}, EIGHT = {ei ** 3}, 'f'ONE = {one}, TEN = {ten}).')