%I #11 Apr 03 2023 10:36:13
%S 2,337,433,1831,2377,3373,3517,104593,209203,229507,236947,244147,
%T 253651,332053,337957,341557,350293,361093,376501,477511,486247,
%U 488311,489847,497047,592393,633001,639433,744283,745051,766651,885133,894637,906973,911341,914941
%N 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.
%H Chai Wah Wu, <a href="/A246872/b246872.txt">Table of n, a(n) for n = 1..1000</a>
%H Prime Curios!, <a href="https://t5k.org/curios/cpage/8733.html">181</a>
%e 433 and 449 are 2 primes which are 1B1 and 1C1 in hexadecimal notation.
%o (Python)
%o from gmpy2 import digits
%o from sympy import isprime
%o A246872 = [2]
%o for n in range(1,16**4):
%o ....s1 = digits(n,16)
%o ....s2 = s1[::-1]
%o ....for m in range(15):
%o ........p1, p2 = int(s1+digits(m,16)+s2,16), int(s1+digits(m+1,16)+s2,16)
%o ........if isprime(p1) and isprime(p2):
%o ............A246872.append(p1)
%o A246872 = sorted(A246872)
%Y Cf. A246488, A246870, A246871.
%K nonn,base
%O 1,1
%A _Chai Wah Wu_, Sep 06 2014
|