A   pernicious number   is a positive integer whose   population count   is a prime.

The   population count   is the number of   ones   in the binary representation of a non-negative integer.



Example
22   (which is   10110   in binary)   has a population count of   3,   which is prime,   and therefore

22   is a pernicious number.



Task
 display the first   25   pernicious numbers   (in decimal).
 display all pernicious numbers between   888,888,877   and   888,888,888   (inclusive).
 display each list of integers on one line   (which may or may not include a title).


See also
 Sequence   A052294 pernicious numbers on The On-Line Encyclopedia of Integer Sequences.
 Rosetta Code entry   population count, evil numbers, odious numbers.


To decide if a number is pernicious:
Find a population count of the number.
If the population count is prime, say yes.
Say no.
 
To find a population count of a number:
Privatize the number.
Loop.
If the number is 0, exit.
Bitwise and the number with the number minus 1.
Bump the population count.
Repeat.
 
To run:
Start up.
Show the first twenty-five pernicious numbers.
Show the pernicious numbers between 888888877 and 888888888.
Wait for the escape key.
Shut down.
 
To show the first twenty-five pernicious numbers:
Put 0 into a number.
Put 0 into a pernicious number count.
Loop.
If the pernicious number count is greater than 24, write "" on the console; exit.
If the number is pernicious, show the number; bump the pernicious number count.
Bump the number.
Repeat.
 
To show a number:
Convert the number to a string.
Write the string then " " on the console without advancing.
 
To show the pernicious numbers between a number and another number:
Privatize the number.
Subtract 1 from the number.
Loop.
If the number is past the other number, exit.
If the number is pernicious, show the number.
Repeat.