Pernicious Numbers (Long)
Details
A pernicious number is a positive number where the sum of its binary expansion is a prime number.
For example, 5 is a pernicious number since 5 = 1012 and 1 + 1 = 2, which is prime.
Print all the pernicious numbers from 0 to 10,000 inclusive, each on their own line.
0 bytes, 0 chars
Restore solution
Compiled from
AT&T syntax to x86-64 Linux. Use
syscalls to write output.
ctrl + enter or