Wikipedia:
In number theory, a pernicious number is a positive integer such that the Hamming weight (or digit sum) of its binary representation is prime.
Example: 310=112 is 1+1=2 which is prime
The next pernicious number is 5, since 1+0+1=2
610=1102 , since 1+0+1=2
- No power of two is a pernicious number. This is trivially true, because powers of two in binary form are represented as a one followed by zeros. So each power of two has a Hamming weight of one, and one is not considered to be a prime.
- Every number of the form 2n + 1 with n > 0, including every Fermat number, is a pernicious number. This is because the sum of the digits in binary form is 2, which is a prime number.
- Every even perfect number is a pernicious number. This is based on the fact that every even perfect number can be represented as 2p−1(2p − 1) with p a prime. Owing to this form, every even perfect number is represented in binary as p ones followed by p − 1 zeros.
- A number of the form 2p − 1 with prime p is a pernicious number known as a Mersenne number (although sometimes Mersenne numbers are defined as 2n − 1 for any natural number n).