cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A255564 Primes having in binary representation a nonprime number of 1's.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 14 2015

Keywords

Comments

Equally: 2 followed by all primes with their hamming weight a composite number.

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.
		

Crossrefs

Complement among primes: A081092.
Intersection of A000040 and A084345.
Subsequences: A027699 \ A019434, A085448, A095077, A255569.
Cf. A000120.

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)))))))