VOOZH about

URL: https://oeis.org/A122712

⇱ A122712 - OEIS


login
A122712
Least prime p of a quartet of 4 distinct primes {p, p+2, q, q+2} such that each digit of q is the same as the corresponding digit of p except that each 6 in p corresponds to a 9 in q and vice versa.
0
1061, 1667, 14561, 16691, 17657, 19961, 36341, 55631, 56207, 60167, 60917, 61151, 62981, 64151, 67577, 68711, 68897, 69737, 76367, 76961, 79691, 90617, 92681, 96737, 98867, 100361, 106451, 115601, 136397, 136991, 139367, 139661, 146057, 155861, 156677, 165047, 167267, 167861, 186647
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
Subsequence of A001359.
Sequence in context: A048895 A020374 A142822 * A172384 A177136 A080334
KEYWORD
base,nonn
AUTHOR
Pierre CAMI, Sep 23 2006
EXTENSIONS
Corrected and extended by Michel Marcus, May 16 2022
STATUS
approved