OFFSET
1,1
COMMENTS
The partial XOR sums are given by A292389.
This sequence is similar to A054408: here we combine the first terms with the binary XOR operation, there with the classic sum operation.
There are no three consecutive odd terms.
If SumXOR_{k=1..n} a(k) = 2, then a(n+1) is odd.
Is this sequence a permutation of the natural numbers?
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
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000 [third column removed by Georg Fischer, Mar 31 2023]
EXAMPLE
a(1) cannot equal 1 (1 is not prime).
a(1) = 2 is suitable.
a(2) = 1 is suitable.
a(3) cannot equal 1 (already used), 2 (already used) or 3 (2 XOR 1 XOR 3 = 0 is not prime).
a(3) = 4 is suitable.
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).
a(4) = 5 is suitable.
PROG
(PARI) s=0; x=0; for (n=1, 67, for (v=1, oo, if (!bit test(s, v) && is prime(bit xor(x, v)), s+=2^v; x=bit xor(x, v); print1 (v ", "); break)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Sep 15 2017
STATUS
approved