login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A362239
Primes such that all composite numbers up to the next prime have the same number of distinct prime divisors.
0
2, 3, 5, 11, 17, 19, 29, 37, 41, 43, 53, 59, 71, 97, 101, 107, 137, 149, 157, 179, 191, 197, 223, 227, 239, 269, 281, 311, 347, 419, 431, 461, 499, 521, 569, 599, 617, 641, 643, 659, 673, 739, 809, 821, 827, 857, 881, 1019, 1031, 1049, 1061, 1091, 1151
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
A001359 is a subsequence.
Cf. A001221 (omega).
Sequence in context: A040083 A045308 A245639 * A147813 A338578 A274386
KEYWORD
nonn
AUTHOR
Mike Jones, Apr 12 2023
EXTENSIONS
More terms from Andrew Howroyd, Apr 12 2023
STATUS
approved