OFFSET
1,3
COMMENTS
XOR denotes the bitwise XOR operator.
This sequence is unbounded, and contains infinitely many 0's.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..8192
Rémy Sigrist, Scatterplot of the first 2^20 terms
EXAMPLE
The first terms, alongside m, are:
n a(n) m
-- ---- ---
1 0 N/A
2 0 1
3 1 N/A
4 0 2
5 2 N/A
6 0 4
7 2 5
8 2 7
9 1 3
10 6 N/A
PROG
(PARI) { p=vector(123); v=0; for (n=1, 77, print1(v", "); [p[1+v], v]=[n, if (p[1+v], bitxor(n, p[1+v]), 0)]) }
CROSSREFS
KEYWORD
AUTHOR
Rémy Sigrist, Sep 27 2021
STATUS
approved