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.
%I A292388 #31 Jul 28 2025 20:37:32 %S A292388 2,1,4,5,7,6,8,9,15,10,12,14,18,16,20,17,19,22,24,26,32,30,36,28,38, %T A292388 34,40,42,44,43,21,50,39,29,48,45,31,52,46,58,54,62,55,41,56,60,66,68, %U A292388 72,74,64,78,84,76,63,57,80,86,88,94,90,92,100,70,96,98,82 %N A292388 Lexicographically earliest sequence of distinct positive terms such that, for any n > 0, SumXOR_{k=1..n} a(k) is prime (where SumXOR is the analog of summation under the binary XOR operation). %C A292388 The partial XOR sums are given by A292389. %C A292388 This sequence is similar to A054408: here we combine the first terms with the binary XOR operation, there with the classic sum operation. %C A292388 There are no three consecutive odd terms. %C A292388 If SumXOR_{k=1..n} a(k) = 2, then a(n+1) is odd. %C A292388 Is this sequence a permutation of the natural numbers? %C A292388 The only odd numbers that can appear have the form p XOR 2 for some prime p. Thus 3, 11, 13, 23, 25, 27, 33, 35, 37, 47, ... never appear. - _Peter Munn_, Jan 19 2023 %H A292388 Rémy Sigrist, <a href="/A292388/b292388.txt">Table of n, a(n) for n = 1..10000</a> [third column removed by _Georg Fischer_, Mar 31 2023] %e A292388 a(1) cannot equal 1 (1 is not prime). %e A292388 a(1) = 2 is suitable. %e A292388 a(2) = 1 is suitable. %e A292388 a(3) cannot equal 1 (already used), 2 (already used) or 3 (2 XOR 1 XOR 3 = 0 is not prime). %e A292388 a(3) = 4 is suitable. %e A292388 a(4) cannot equal 1 (already used), 2 (already user), 3 (2 XOR 1 XOR 4 XOR 3 = 4 is not prime) or 4 (already used). %e A292388 a(4) = 5 is suitable. %o A292388 (PARI) s=0; x=0; for (n=1, 67, for (v=1, oo, if (!bittest(s,v) && isprime(bitxor(x,v)), s+=2^v; x=bitxor(x,v); print1 (v ", "); break))) %Y A292388 Cf. A054408, A292389. %K A292388 nonn,base %O A292388 1,1 %A A292388 _Rémy Sigrist_, Sep 15 2017