login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
Select[Range@ 120, PrimeQ@ DigitCount[#, 2, 0] &] (* Michael De Vlieger, Oct 26 2017 *)
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
i+=1 # Indranil Ghosh, Feb 03 2017
CROSSREFS
Cf. A052294.
Sequence in context: A193166 A155101 A158582 * A080970 A288862 A274584
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Sep 20 2008
EXTENSIONS
Many more terms from Reikku Kulon, Sep 21 2008
Name edited by Michel Marcus, Apr 30 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 16:35 EDT 2024. Contains 371749 sequences. (Running on oeis4.)