%I #39 Oct 02 2021 04:28:35
%S 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,
%T 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,
%U 0,60,0,6,53,0,58,0,5,4,57,0,68,0,1,21,29,38,0
%N 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.
%C XOR denotes the bitwise XOR operator.
%C This sequence is unbounded, and contains infinitely many 0's.
%H Rémy Sigrist, <a href="/A346516/b346516.txt">Table of n, a(n) for n = 0..8192</a>
%H Rémy Sigrist, <a href="/A346516/a346516.png">Scatterplot of the first 2^20 terms</a>
%e The first terms, alongside the corresponding k's, are:
%e n a(n) k's
%e -- ---- --------------------
%e 0 0 None
%e 1 0 0
%e 2 0 0, 1
%e 3 1 None
%e 4 0 0, 1, 2
%e 5 3 None
%e 6 0 0, 1, 2, 4
%e 7 7 None
%e 8 0 0, 1, 2, 4, 6
%e 9 1 3
%e 10 3 5
%e 11 5 None
%e 12 0 0, 1, 2, 4, 6, 8
%e 13 9 None
%e 14 0 0, 1, 2, 4, 6, 8, 12
%e 15 5 11
%o (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) }
%Y Cf. A181391, A348080.
%K nonn,base
%O 0,6
%A _Rémy Sigrist_, Sep 27 2021
|