|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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).
|
|
KEYWORD
|
nonn,easy,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|