OFFSET
1,1
COMMENTS
This sequence is finite. For k > 118, there are always more odd nonprimes than primes <= k.
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
Giorgos Kalogeropoulos, Nov 01 2021
STATUS
approved