OFFSET
1,1
EXAMPLE
19 is a term because 19 is a prime and each of the composite numbers up to the next prime (20, 21, and 22) has exactly 2 distinct prime divisors.
MATHEMATICA
q[p_] := Length[Union[Table[PrimeNu[c], {c, Range[p + 1, NextPrime[p] - 1]}]]] <= 1; Select[Prime[Range[200]], q] (* Amiram Eldar, May 18 2023 *)
PROG
(PARI) isok(p)=if(isprime(p), my(q=nextprime(p+1), t=omega(p+1)); for(i=p+2, q-1, if(omega(i)<>t, return(0))); 1, 0) \\ Andrew Howroyd, Apr 12 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Mike Jones, Apr 12 2023
EXTENSIONS
More terms from Andrew Howroyd, Apr 12 2023
STATUS
approved