login
A235985
Primes p such that 3p-1 has even Hamming weight.
0
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,1
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,...
EXAMPLE
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).
MATHEMATICA
Select[Prime@Range@200, EvenQ@ First@ DigitCount[3#-1, 2] &] (* Giovanni Resta, Jan 26 2014 *)
PROG
(PARI) isok(p) = isprime(p) && !(hammingweight(3*p-1) % 2); \\ Michel Marcus, Jan 18 2014
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).
Sequence in context: A122631 A269313 A147969 * A045381 A180537 A042145
KEYWORD
nonn,base
AUTHOR
STATUS
approved