login
A080789
Numbers that are primes when turned upside down.
3
11, 19, 61, 68, 101, 109, 110, 116, 118, 161, 166, 169, 181, 188, 190, 199, 601, 608, 610, 616, 619, 661, 680, 1006, 1010, 1018, 1019, 1061, 1066, 1081, 1090, 1091, 1096, 1100, 1106, 1108, 1109, 1118, 1160, 1169, 1180, 1181, 1186, 1601, 1606, 1609, 1610, 1618
OFFSET
1,1
REFERENCES
P. Giannopoulos, The Brainteasers (unpublished)
LINKS
PROG
(Python)
from sympy import isprime
from itertools import product
def ud(s):
return s[::-1].translate({ord('6'):ord('9'), ord('9'):ord('6')})
def auptod(maxdigits):
alst = []
for d in range(1, maxdigits+1):
for start in "16":
for p in product("01689", repeat=d-1):
s = start + "".join(p)
t, udt = int(s), int(ud(s))
if isprime(udt): alst.append(t)
return alst
print(auptod(4)) # Michael S. Branicky, Nov 19 2021
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
P. Giannopoulos (pgiannop1(AT)yahoo.com), Mar 12 2003
EXTENSIONS
610 inserted and a(24) and beyond from Michael S. Branicky, Nov 19 2021
STATUS
approved