OFFSET
1,1
COMMENTS
Also numbers m such that m-4, m-1, m+5, m+8, m+11 and m+20 cannot be represented as x*y + x + y, with x >= y > 1 (A254636).
Subsequence of A358571.
Number of terms < 10^k: 0, 2, 2, 5, 5, 12, 34, 150, 655, ...
All terms p and (p-3)/2 have a final decimal digit of 7. This follows from considering possibilities modulo 10 and implies p + 18 and (p-3)/2 + 18 are divisible by 5 and hence composite. Both p and (p-3)/2 are therefore also terms of A046118. - Andrew Howroyd, Dec 31 2022
EXAMPLE
97 is the smallest prime in the sexy prime triple (97, 103, 109), and the triple (47 = (97 - 3)/2, 47 + 6, 47 + 12) forms another sexy prime triple. Hence 97 is in the sequence.
MATHEMATICA
Select[Prime[Range[700000]], AllTrue[Join[# + {6, 12}, (#-3)/2 + {0, 6, 12}], PrimeQ] &] (* Amiram Eldar, Nov 23 2022 *)
PROG
(PARI)
istriple(p)={isprime(p) && isprime(p+6) && isprime(p+12)}
isok(p)={istriple(p) && istriple((p-3)/2)}
{ forprime(p=1, 10^7, if(isok(p), print1(p, ", "))) } \\ Andrew Howroyd, Dec 30 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Lamine Ngom, Nov 23 2022
STATUS
approved