A237989 Numbers m such that the numbers of primes, even positive integers and odd positive integers less than or equal to m are all odd.
2, 6, 18, 26, 34, 42, 50, 70, 74, 78, 86, 98, 106, 110, 130, 138, 150, 158, 162, 170, 198, 214, 218, 222, 234, 238, 242, 246, 250, 258, 262, 270, 278, 286, 290, 310, 314, 334, 354, 358, 370, 382, 390, 394, 402, 406, 442, 450, 454, 462, 470, 474, 478, 490, 502
Offset: 1
Examples
A cubic die whose faces are marked with the numbers from 1 to 6 has odd number of sides marked with prime numbers (2, 3 and 5), even integers (2, 4 and 6) and odd integers (1, 3 and 5). Therefore, 6 is in the sequence.
Links
- Ivan N. Ianakiev, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Select[Range[2, 1000, 4], OddQ[PrimePi[#]] &] (* Paolo Xausa, Jun 24 2024 *)
-
PARI
isok(n) = (primepi(n) % 2) && ((n % 4) == 2); \\ Michel Marcus, Mar 12 2014
Formula
Intersection of A042963 (odd number of odd numbers), A042964 (odd number of even numbers), A057812 (odd number of primes). - Michel Marcus, Feb 26 2014