login
A342299
Lesser of twin primes p,p+2 such that the absolute difference of p and the reverse of p+2 is a twin prime and the absolute difference of p+2 and the reverse of p is a twin prime.
1
41, 281, 827, 857, 2081, 2801, 8087, 20981, 21191, 21491, 81197, 88607, 206411, 225941, 227531, 233141, 249131, 255971, 261971, 279551, 283571, 825107, 827537, 828407, 834857, 857567, 861977, 864047, 869777, 879167, 883577, 895787, 2051111, 2125601, 2128601, 2130701, 2141801, 2147021, 2163221
OFFSET
1,1
COMMENTS
Lesser of twin primes p such that both p and p+2 are in A342216.
Except for the first term, all terms either start with 2 and end with 1 or start with 8 and end with 7.
LINKS
EXAMPLE
a(3) = 827 is a term because 827 and 829 are twin primes, and |827-928| = 101 and |827-728| = 101, and 101 is a twin prime.
a(5) = 2081 is a term because 2081 and 2083 are twin primes, and |2081-3802| = 1721 and |2083-1802| = 281 are twin primes.
MAPLE
digrev:= proc(n) local L, i;
L:= convert(n, base, 10);
add(10^(i-1)*L[-i], i=1..nops(L))
end proc:
filter:= proc(p) local q, t, s;
if not isprime(p) then return false fi;
q:= p+2;
if not isprime(q) then return false fi;
t:= abs(p - digrev(q));
s:= abs(q - digrev(p));
isprime(t) and isprime(s) and (isprime(t-2) or isprime(t+2)) and (isprime(s-2) or isprime(s+2))
end proc:
select(filter, [seq(i, i=5..10^7, 6)]);
CROSSREFS
KEYWORD
nonn,base
AUTHOR
J. M. Bergot and Robert Israel, Mar 07 2021
STATUS
approved