login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A027704
Numbers k such that the k-th prime has an even number of 1's in its binary expansion and the (k+1)st prime has an odd number of 1's.
3
3, 7, 10, 14, 16, 20, 24, 26, 30, 35, 38, 45, 57, 60, 62, 64, 66, 72, 74, 77, 79, 87, 89, 92, 97, 99, 101, 105, 109, 114, 117, 122, 125, 131, 133, 137, 139, 142, 148, 150, 152, 155, 159, 166, 170, 173, 176, 178, 185, 187, 190, 194, 201, 203, 206, 209, 211, 215, 223
OFFSET
1,1
LINKS
MAPLE
Primes:= [seq(ithprime(i), i=1..100)]:
Q:= map(t -> convert(convert(t, base, 2), `+`) mod 2, Primes):
DQ:= Q[2..-1]-Q[1..-2]:
select(t -> DQ[t] = 1, [$1..nops(DQ)]); # Robert Israel, Mar 27 2018
PROG
(PARI) isok(n) = my(p=prime(n)); !(hammingweight(p) % 2) && (hammingweight(nextprime(p+1)) % 2); \\ Michel Marcus, Mar 29 2018
CROSSREFS
Cf. A027703 (corresponding primes).
Sequence in context: A374639 A289114 A289027 * A061289 A288999 A310187
KEYWORD
nonn,easy,base
EXTENSIONS
More terms from Erich Friedman
STATUS
approved