%I #11 Oct 02 2021 04:28:39
%S 0,0,3,0,6,0,2,0,14,0,2,12,0,7,0,2,27,0,29,0,6,16,0,3,27,8,0,12,16,11,
%T 0,4,0,62,0,2,52,0,5,0,14,32,0,3,52,8,52,2,20,0,25,0,6,32,28,0,12,37,
%U 0,3,16,32,8,17,0,122,0,2,116,0,5,96,0,15,0,2,8
%N A variant of Van Eck's sequence: For n >= 1, if there exists an m < n such that a(m) = a(n), take the largest such m and set a(n+1) = n XOR m; otherwise a(n+1) = 0. Start with a(1)=0.
%C XOR denotes the bitwise XOR operator.
%C This sequence is unbounded, and contains infinitely many 0's.
%H Rémy Sigrist, <a href="/A348080/b348080.txt">Table of n, a(n) for n = 1..8192</a>
%H Rémy Sigrist, <a href="/A348080/a348080.png">Scatterplot of the first 2^20 terms</a>
%e The first terms, alongside m, are:
%e n a(n) m
%e -- ---- ---
%e 1 0 N/A
%e 2 0 1
%e 3 1 N/A
%e 4 0 2
%e 5 2 N/A
%e 6 0 4
%e 7 2 5
%e 8 2 7
%e 9 1 3
%e 10 6 N/A
%o (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)]) }
%Y Cf. A181391, A346516.
%K nonn,base,look
%O 1,3
%A _Rémy Sigrist_, Sep 27 2021