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.

A376235 Prime numbers with Hamming weight neither prime nor a power of 2.

Original entry on oeis.org

311, 317, 347, 349, 359, 373, 461, 467, 571, 599, 619, 683, 691, 739, 797, 811, 821, 839, 853, 857, 881, 907, 937, 977, 991, 1019, 1021, 1103, 1117, 1181, 1223, 1229, 1237, 1279, 1303, 1307, 1319, 1381, 1427, 1429, 1433, 1471, 1481, 1489, 1531, 1559, 1579, 1607, 1613, 1619, 1621, 1637, 1663
Offset: 1

Views

Author

M. F. Hasler, Oct 24 2024

Keywords

Comments

Surprisingly, all primes less than 311 have a Hamming weight (sum of their binary digits: A000120) equal to either a prime or a power of two (cf. A174090). But for larger primes, exceptions become more and more frequent.

Crossrefs

Cf. A000120 (binary or Hamming weight), A174090 (union of primes and powers of two).

Programs

  • PARI
    select( {is_A376235(n)=!is_A174090(hammingweight(n))&&isprime(n)}, [0..2222])