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.

A235985 Primes p such that 3p-1 has even Hamming weight.

Original entry on oeis.org

2, 7, 23, 29, 31, 71, 103, 107, 109, 113, 127, 151, 157, 167, 199, 227, 229, 233, 263, 283, 313, 347, 349, 359, 367, 373, 379, 383, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 541, 569, 599, 607, 619, 631, 647, 739, 761, 797
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 17 2014

Keywords

Comments

Primes p such that A000120(3p-1) is even.
Smallest prime p such that A000120(np-1) is even: 7, 2, 2, 7, 5, 3, 3, 2, 2, 3, 5, 2, 7,...

Examples

			23 is in this sequence because A000120(3*23-1) = A000120(68) = 2 (even number).
29 is in this sequence because A000120(3*29-1) = A000120(86) = 4 (even number).
		

Crossrefs

Cf. A019434 (odd primes p having Hamming weight 2), A027697 (primes p having odd Hamming weight), A027699 (primes p having an even Hamming weight).

Programs

  • Mathematica
    Select[Prime@Range@200, EvenQ@ First@ DigitCount[3#-1, 2] &] (* Giovanni Resta, Jan 26 2014 *)
  • PARI
    isok(p) = isprime(p) && !(hammingweight(3*p-1) % 2); \\ Michel Marcus, Jan 18 2014