|
|
A144754
|
|
Integers that have a prime number of 0's in their binary expansion.
|
|
5
|
|
|
4, 8, 9, 10, 12, 17, 18, 19, 20, 21, 22, 24, 25, 26, 28, 32, 35, 37, 38, 39, 41, 42, 43, 44, 45, 46, 49, 50, 51, 52, 53, 54, 56, 57, 58, 60, 65, 66, 68, 71, 72, 75, 77, 78, 79, 80, 83, 85, 86, 87, 89, 90, 91, 92, 93, 94, 96, 99, 101, 102, 103, 105, 106, 107, 108, 109, 110
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
66 written in binary is 1000010. This has five 0's and five is a prime. So 66 is included in the sequence.
|
|
MATHEMATICA
|
|
|
PROG
|
(PARI) isok(n) = isprime(#binary(n) - hammingweight(n)); \\ Michel Marcus, Feb 23 2016
(Python)
from sympy import isprime
i=j=1
while j<=250:
if isprime(bin(i)[2:].count("0")):
print(str(j)+" "+str(i))
j+=1
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|