Skip to content

PerniciousNumbers ​

The pernicious numbers 3,5,6,7,9,…3, 5, 6, 7, 9, …: positive integers whose binary popcount is itself prime.

PerniciousNumbersthe nn with popcount(n)\mathrm{popcount}(n) prime, an infinite indexed collection.

Domain: Collections

Details
  • A lazy indexed collection: Count(PerniciousNumbers)=+∞Count(PerniciousNumbers) = +\infty -- every nn with exactly two 1-bits already qualifies (popcount 2 is prime), and there are infinitely many. OEIS A052294.
  • At(PerniciousNumbers,k)At(PerniciousNumbers, k) unranks by scanning forward -- At(PerniciousNumbers,1)=3At(PerniciousNumbers, 1) = 3.
  • Membership goes through Element: Element(7,PerniciousNumbers)Element(7, PerniciousNumbers) is true (popcount 3, prime), Element(15,PerniciousNumbers)Element(15, PerniciousNumbers) is false (popcount 4).

Enumeration

Examples

1 more kept as data, checked against the oracles
About
Examples1
CrosswalkOEIS

See also: Count, At, Element, EvilNumbers, OdiousNumbers, PrimeNumbers