login
A253149
Primes >= 256 that remain primes when the digits are reversed in base 256.
3
257, 269, 293, 311, 313, 347, 379, 397, 419, 449, 479, 491, 773, 809, 823, 827, 829, 857, 883, 887, 947, 953, 971, 977, 1013, 1283, 1289, 1297, 1301, 1307, 1321, 1327, 1367, 1373, 1399, 1409, 1429, 1439, 1451, 1453, 1481, 1483, 1511, 1523, 1801, 1811, 1847, 1867
OFFSET
1,1
COMMENTS
Reversing the digits in base 256 is equivalent to reading a number in big-endian format using little-endian order with 8-bit words. See also A238853.
LINKS
EXAMPLE
1299647 is prime and written in base 16 is 13 d4 bf whereas bf d4 13 = 12571667 is also prime.
PROG
(Python)
from sympy import prime, isprime
def reversedigits(n, b=10): # reverse digits of n in base b
x, y = n, 0
while x >= b:
x, r = divmod(x, b)
y = b*y + r
return b*y + x
A253149_list = []
for n in range(1, 300):
p = prime(n)
if p > 255 and isprime(reversedigits(p, 256)):
A253149_list.append(p)
print(A253149_list)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Chai Wah Wu, Dec 30 2014
STATUS
approved