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
Robert Israel, Table of n, a(n) for n = 1..4327
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