OFFSET
1,1
COMMENTS
Subsequence of A014574.
EXAMPLE
198 is sandwiched between two twin primes 197 and 199. 176418 = 198*891 is also sandwiched between two twin primes. Thus, 198 is in this sequence.
MATHEMATICA
Select[Range[100000], PrimeQ[# - 1] && PrimeQ[# + 1] && PrimeQ[# FromDigits[Reverse[IntegerDigits[#]]] - 1] && PrimeQ[# FromDigits[Reverse[IntegerDigits[#]]] + 1] &]
PROG
(Python)
from sympy import isprime
def sw(n): return isprime(n-1) and isprime(n+1)
def ok(n): return n%2 == 0 and sw(n) and sw(n*int(str(n)[::-1]))
print([k for k in range(10**5) if ok(k)]) # Michael S. Branicky, Sep 10 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Tanya Khovanova, Sep 10 2022
STATUS
approved