login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A292204 Primes as they appear in A006068. 2
3, 2, 7, 5, 13, 11, 31, 29, 17, 19, 23, 61, 59, 53, 37, 47, 41, 43, 127, 113, 97, 103, 101, 109, 107, 67, 71, 79, 73, 89, 83, 251, 241, 227, 229, 239, 233, 193, 199, 197, 223, 211, 131, 137, 139, 157, 151, 149, 191, 179, 181, 163, 167, 173, 509, 499, 503, 487, 491, 449, 463, 461 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(n) is the i-th prime (as it appears in A000040) for i = 2, 1, 4, 3, 6, 5, 9, 10, 11, 8, 7, 15, 17, 18, 16, 14, etc.
LINKS
MATHEMATICA
f[n_] := BitXor @@ Table[ Floor[n/2^m], {m, 0, Floor[Log2@ n]}]; Select[ Array[f, 300], PrimeQ]
PROG
(PARI) grayinto(n) = my(B=n); for(k=1, log(n+1)\log(2), B=bitxor(B, n\2^k)); B;
lista(nn) = for (n=1, nn, if (isprime(p=grayinto(n)), print1(p, ", "))); \\ Michel Marcus, Oct 10 2017
(Python)
from itertools import count, islice
from sympy import isprime
def A292204_gen(): # generator of terms
for n in count(0):
k, m = n, n>>1
while m > 0:
k ^= m
m >>= 1
if isprime(k):
yield k
A292204_list = list(islice(A292204_gen(), 30)) # Chai Wah Wu, Jun 29 2022
CROSSREFS
Sequence in context: A215622 A195820 A006921 * A292203 A295642 A014693
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Sep 11 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)