cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A292204 Primes as they appear in A006068.

This page as a plain text file.
%I A292204 #20 Jun 30 2022 08:39:56
%S A292204 3,2,7,5,13,11,31,29,17,19,23,61,59,53,37,47,41,43,127,113,97,103,101,
%T A292204 109,107,67,71,79,73,89,83,251,241,227,229,239,233,193,199,197,223,
%U A292204 211,131,137,139,157,151,149,191,179,181,163,167,173,509,499,503,487,491,449,463,461
%N A292204 Primes as they appear in A006068.
%C A292204 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.
%t A292204 f[n_] := BitXor @@ Table[ Floor[n/2^m], {m, 0, Floor[Log2@ n]}]; Select[ Array[f, 300], PrimeQ]
%o A292204 (PARI) grayinto(n) = my(B=n); for(k=1, log(n+1)\log(2), B=bitxor(B, n\2^k)); B;
%o A292204 lista(nn) = for (n=1, nn, if (isprime(p=grayinto(n)), print1(p, ", "))); \\ _Michel Marcus_, Oct 10 2017
%o A292204 (Python)
%o A292204 from itertools import count, islice
%o A292204 from sympy import isprime
%o A292204 def A292204_gen(): # generator of terms
%o A292204     for n in count(0):
%o A292204         k, m = n, n>>1
%o A292204         while m > 0:
%o A292204             k ^= m
%o A292204             m >>= 1
%o A292204         if isprime(k):
%o A292204             yield k
%o A292204 A292204_list = list(islice(A292204_gen(),30)) # _Chai Wah Wu_, Jun 29 2022
%Y A292204 Cf. A006068, A292203, A292205.
%K A292204 nonn
%O A292204 1,1
%A A292204 _Robert G. Wilson v_, Sep 11 2017