|
|
A246870
|
|
Lesser of the Gridgeman pairs in base 2 in increasing order: pairs of primes palindromic in base 2 which differ only in their middle digits.
|
|
3
|
|
|
5, 22541, 296201, 360461, 499151, 514271, 1071937, 1096609, 1298809, 1347877, 1458253, 4404833, 5497829, 5694389, 6824459, 7010219, 7168859, 7267259, 8102639, 17629537, 19525417, 21884773, 23330893, 24364957, 24440413, 24538333, 24735037, 25445443, 28493467
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
22541 and 22669 are primes with binary representations 101100000001101 and 101100010001101 respectively.
|
|
PROG
|
(Python)
from sympy import isprime
for n in range(1, 2**17):
....s1 = bin(n)[2:]
....s2 = s1[::-1]
....p1, p2 = int(s1+'0'+s2, base), int(s1+'1'+s2, base)
....if isprime(p1) and isprime(p2):
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|