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!)
A334344 Binary Moran numbers: numbers k such that k divided by its binary weight (A000120) is a prime number. 3
2, 6, 10, 21, 34, 55, 69, 92, 115, 116, 155, 172, 185, 205, 212, 222, 246, 284, 295, 318, 321, 332, 355, 356, 366, 395, 404, 438, 452, 474, 498, 514, 535, 556, 565, 596, 606, 623, 652, 749, 788, 822, 835, 865, 889, 905, 973, 978, 1041, 1052, 1076, 1086, 1108, 1124 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
2 is a term since its binary weight is 1 and 2/1 = 2, which is a prime number.
6 (110 in binary) has a binary weight of 2 and 6/2 = 3, which is prime, so 6 is also in the sequence. Likewise 10 (1010 in binary) also has a binary weight of 2, and 10/2 = 5, which is prime, so 10 is also in the sequence.
14 (1110 in binary) has binary weight of 3. But 14/3 is not prime, so 14 is not in the sequence.
MAPLE
q:= n-> (p-> is(p, integer) and isprime(p))(n/add(i, i=Bits[Split](n))):
select(q, [$1..1200])[]; # Alois P. Heinz, Apr 23 2020
MATHEMATICA
Select[Range[1000], PrimeQ[# / DigitCount[#, 2, 1]] &]
PROG
(Scala) def isPrime(num: Int): Boolean = Math.abs(num) match {
case 0 => false; case 1 => false; case n => (2 to Math.floor(Math.sqrt(n)).toInt) forall (p => n % p != 0)
}
(1 to 1000).filter{ n => val binWt = Integer.bitCount(n); (n % binWt) == 0 && isPrime(n / binWt) } // Alonso del Arte, Apr 23 2020
(PARI) isok(m) = iferr(isprime(m/hammingweight(m)), E, 0); \\ Michel Marcus, Apr 24 2020
CROSSREFS
Subsequence of A049445.
Sequence in context: A083176 A103628 A207382 * A272952 A034450 A297185
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Apr 23 2020
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 May 8 06:05 EDT 2024. Contains 372319 sequences. (Running on oeis4.)