OFFSET
1,1
EXAMPLE
16691 and 16693 are twin primes, as are 19961 and 19963, so 16691 is a term.
PROG
(PARI) f(d) = my(ok=0); for (i=1, #d, if (d[i]==6, ok=1; d[i]=9, if (d[i]==9, d[i]=6))); if (ok, fromdigits(d));
isok(p) = {if (isprime(p) && isprime(p+2), my(q=f(digits(p))); isprime(q) && isprime(q+2); ); } \\ Michel Marcus, May 16 2022
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Pierre CAMI, Sep 23 2006
EXTENSIONS
Corrected and extended by Michel Marcus, May 16 2022
STATUS
approved