OFFSET
1,1
COMMENTS
Primes that are Gray codes of other "source" primes, ordered along increasing source primes, i.e., in the order of appearance in A143292.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Kevin Ryde, A143329 gray code primes sample values, SeqFan Mailing list Apr 19 2012
MATHEMATICA
GrayCode[n_] := BitXor[n, Floor[n/2]]; Select[ GrayCode@ Prime@ Range@ 275, PrimeQ] (* Robert G. Wilson v, Mar 11 2015 *)
PROG
(Magma)
I2B:=func<i | [b eq 1: b in IntegerToSequence(i, 2)]>;
B2I:=func<s | SequenceToInteger([b select 1 else 0: b in s], 2)>;
[g: n in [1..999] | IsPrime(g) where g is B2I(Xor(I2B(i), I2B(i div 2)cat[false])) where i is NthPrime(n)]; // Jason Kimberley, Apr 19 2012
(PARI) forprime(p=2, 3e6, if(isprime(t=bitxor(p, p>>1)), print1(t", "))) \\ Charles R Greathouse IV, Apr 19 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula and Gary W. Adamson, Oct 21 2008
EXTENSIONS
Jason Kimberley corrected all terms after a(38) at the suggestion of Kevin Ryde, Apr 19 2012
STATUS
approved