|
|
A246872
|
|
Lesser of Gridgeman pairs in base 16 in increasing order: pairs of primes palindromic in base 16 which differ only in their middle digits by a difference of 1.
|
|
3
|
|
|
2, 337, 433, 1831, 2377, 3373, 3517, 104593, 209203, 229507, 236947, 244147, 253651, 332053, 337957, 341557, 350293, 361093, 376501, 477511, 486247, 488311, 489847, 497047, 592393, 633001, 639433, 744283, 745051, 766651, 885133, 894637, 906973, 911341, 914941
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
433 and 449 are 2 primes which are 1B1 and 1C1 in hexadecimal notation.
|
|
PROG
|
(Python)
from gmpy2 import digits
from sympy import isprime
for n in range(1, 16**4):
....s1 = digits(n, 16)
....s2 = s1[::-1]
....for m in range(15):
........p1, p2 = int(s1+digits(m, 16)+s2, 16), int(s1+digits(m+1, 16)+s2, 16)
........if isprime(p1) and isprime(p2):
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|