login
A246871
Lesser of Gridgeman pairs in base 8 in increasing order: pairs of primes palindromic in base 8 which differ only in their middle digits by a difference of 1.
3
2, 89, 479, 12547, 14563, 15667, 28807, 30367, 31663, 32119, 296969, 311561, 318281, 328721, 383321, 409889, 422369, 452009, 490481, 511289, 792131, 936227, 951851, 1345037, 1366349, 1444901, 1505261, 1543229, 1852679, 1861511, 1865159, 1871951, 1898447
OFFSET
1,1
LINKS
Prime Curios!, 181
EXAMPLE
12547 and 12611 are 2 primes with base 8 representation 30403 and 30503 respectively.
PROG
(Python)
from gmpy2 import digits
from sympy import isprime
A246871 = [2]
for n in range(1, 8**5):
....s1 = digits(n, 8)
....s2 = s1[::-1]
....for m in range(7):
........p1, p2 = int(s1+str(m)+s2, 8), int(s1+str(m+1)+s2, 8)
........if isprime(p1) and isprime(p2):
............A246871.append(p1)
A246871 = sorted(A246871)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Chai Wah Wu, Sep 06 2014
STATUS
approved