A255564 Primes having in binary representation a nonprime number of 1's.
2, 23, 29, 43, 53, 71, 83, 89, 101, 113, 139, 149, 163, 197, 263, 269, 277, 281, 293, 311, 317, 337, 347, 349, 353, 359, 373, 383, 389, 401, 449, 461, 467, 479, 503, 509, 523, 547, 571, 593, 599, 619, 643, 673, 683, 691, 739, 751, 773, 797, 811, 821, 839, 853, 857, 863, 881, 887, 907, 937, 977, 983, 991, 1013, 1019, 1021, 1031, 1049, 1061
Offset: 1
Keywords
Examples
2, which in binary (A007088) is "10", has just one 1-bit, and 1 is not a prime, thus 2 is included in the sequence. 23, which in binary is "10111", has four 1-bits, and 4 is not a prime, thus 23 is included in the sequence.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
PARI
i = 0; forprime(n=2, 2^31, if(!isprime(hammingweight(n)), i++; write("b255564.txt", i, " ", n); if(i>=10000,return(n))));
-
Scheme
;; With Antti Karttunen's IntSeq-library (define A255564 (MATCHING-POS 1 1 (lambda (n) (and (prime? n) (not (prime? (A000120 n)))))))
Comments