OFFSET
1,1
LINKS
Indranil Ghosh, Table of n, a(n) for n = 1..10000
Wikipedia, Gray code.
EXAMPLE
27 is in the sequence because the binary reflected Gray Code representation of 27 is 10110 which has 2 0's and 2 is prime.
MATHEMATICA
Select[Range[100], PrimeQ[DigitCount[BitXor[#, Floor[#/2]], 2, 0]] &] (* Amiram Eldar, May 01 2021 *)
PROG
(PARI) is(n)=isprime(logint(n, 2)-hammingweight(bitxor(n, n>>1))+1) \\ Charles R Greathouse IV, Jan 13 2017
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Indranil Ghosh, Jan 12 2017
STATUS
approved