login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A346516
A variant of Van Eck's sequence: For n >= 0, a(n+1) is the result of combining by XOR the numbers k such that k < n and a(k) = a(n). Start with a(0)=0.
2
0, 0, 0, 1, 0, 3, 0, 7, 0, 1, 3, 5, 0, 9, 0, 5, 11, 0, 11, 16, 0, 26, 0, 14, 0, 24, 0, 0, 26, 21, 0, 1, 10, 0, 31, 0, 62, 0, 29, 0, 56, 0, 31, 34, 0, 54, 0, 26, 9, 13, 0, 52, 0, 6, 0, 50, 0, 4, 0, 60, 0, 6, 53, 0, 58, 0, 5, 4, 57, 0, 68, 0, 1, 21, 29, 38, 0
OFFSET
0,6
COMMENTS
XOR denotes the bitwise XOR operator.
This sequence is unbounded, and contains infinitely many 0's.
EXAMPLE
The first terms, alongside the corresponding k's, are:
n a(n) k's
-- ---- --------------------
0 0 None
1 0 0
2 0 0, 1
3 1 None
4 0 0, 1, 2
5 3 None
6 0 0, 1, 2, 4
7 7 None
8 0 0, 1, 2, 4, 6
9 1 3
10 3 5
11 5 None
12 0 0, 1, 2, 4, 6, 8
13 9 None
14 0 0, 1, 2, 4, 6, 8, 12
15 5 11
PROG
(PARI) { p=vector(123); v=0; for (n=0, 76, print1(v", "); w=p[1+v]; p[1+v]=bitxor(p[1+v], n); v=w) }
CROSSREFS
Sequence in context: A137436 A099893 A135534 * A337767 A249904 A324875
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Sep 27 2021
STATUS
approved