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”).

A348852
Numbers k such that the number of odd nonprimes <= k is equal to the number of primes <= k.
0
2, 93, 94, 97, 98, 101, 102, 105, 106, 117, 118
OFFSET
1,1
COMMENTS
This sequence is finite. For k > 118, there are always more odd nonprimes than primes <= k.
Numbers k such that A000720(k) = A033271(k). - Michel Marcus, Nov 06 2021
EXAMPLE
a(4) = 97 is a term because there are 25 odd nonprimes <= 97 and 25 primes <= 97.
MATHEMATICA
Select[Range@1000, (k=#; Length@Select[Range@k, OddQ@#&&!PrimeQ@#&]==PrimePi@k)&]
PROG
(PARI) isok(k) = primepi(k) == #select(x->(!isprime(x) && (x%2)), [1..k]); \\ Michel Marcus, Nov 06 2021
CROSSREFS
KEYWORD
nonn,fini,full
AUTHOR
STATUS
approved