%I #21 Mar 29 2020 02:12:22
%S 1,8,1,48,1,8,1,68,1,8,1,48,1,8,1,1158,1,8,1,48,1,8,1,68,1,8,1,48,1,8,
%T 1,4752,1,8,1,48,1,8,1,68,1,8,1,48,1,8,1,1158,1,8,1,48,1,8,1,68,1,8,1,
%U 48,1,8,1,81926,1,8,1,48,1,8,1,68,1,8,1,48,1,8
%N Lexicographically earliest sequence of positive integers such that for any m and n with m <= n, a(m) XOR ... XOR a(n) is neither null nor prime (where XOR denotes the bitwise XOR operator).
%C This sequence is a variant of A332941.
%C This sequence is infinite:
%C - suppose that the first n terms are known,
%C - let M = max_{k <= n} a(k) XOR ... XOR a(n),
%C - let k be such that M < 2^k,
%C - as there are prime gaps of any size,
%C we can choose an interval of the form [m*2^k..(m+1)*2^k] without prime numbers,
%C - hence a(n+1) <= m*2^k, QED.
%H Rémy Sigrist, <a href="/A333403/b333403.txt">Table of n, a(n) for n = 1..511</a>
%H Rémy Sigrist, <a href="/A333403/a333403.gp.txt">PARI program for A333403</a>
%F a(m) = a(n) iff A007814(n) = A007814(m).
%F a(n) = a(2^k-n) for any k >= 0 and n = 1..2^k-1.
%e The values of a(i) XOR ... XOR a(j) for i <= j <= 8 are:
%e i\j| 1 2 3 4 5 6 7 8
%e ---+------------------------------
%e 1| 1 9 8 56 57 49 48 116
%e 2| . 8 9 57 56 48 49 117
%e 3| . . 1 49 48 56 57 125
%e 4| . . . 48 49 57 56 124
%e 5| . . . . 1 9 8 76
%e 6| . . . . . 8 9 77
%e 7| . . . . . . 1 69
%e 8| . . . . . . . 68
%o (PARI) See Links section.
%Y Cf. A007814, A332941.
%K nonn,base
%O 1,2
%A _Rémy Sigrist_, Mar 22 2020