login
A255564
Primes having in binary representation a nonprime number of 1's.
2
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,1
COMMENTS
Equally: 2 followed by all primes with their hamming weight a composite number.
LINKS
EXAMPLE
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.
PROG
(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)))))))
CROSSREFS
Complement among primes: A081092.
Intersection of A000040 and A084345.
Subsequences: A027699 \ A019434, A085448, A095077, A255569.
Cf. A000120.
Sequence in context: A114549 A235148 A208325 * A034843 A084373 A107148
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 14 2015
STATUS
approved