cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A336033 a(n) is the number of k such that 1 <= k < n and a(k) XOR ... XOR a(n-1) = 0 (where XOR denotes the bitwise XOR operator).

This page as a plain text file.
%I A336033 #28 Jan 11 2021 22:02:28
%S A336033 0,1,0,1,2,0,1,0,1,2,3,2,2,3,4,0,1,0,1,2,0,1,0,1,2,3,2,2,3,4,5,3,3,4,
%T A336033 3,3,4,5,6,4,4,5,4,4,5,6,7,5,5,6,5,5,6,7,8,0,1,0,1,2,0,1,0,1,2,3,2,2,
%U A336033 3,4,0,1,0,1,2,0,1,0,1,2,3,2,2,3,4,5,3
%N A336033 a(n) is the number of k such that 1 <= k < n and a(k) XOR ... XOR a(n-1) = 0 (where XOR denotes the bitwise XOR operator).
%C A336033 This sequence has fractal features; each time the sequence hits a new power of 2, say a(m) = 2^k for the first time, then a(m + i) = a(i) for i = 1..m and a(2*m + 1) = 1 + a(m).
%C A336033 These are (a strong conjecture) the "y" values from A340488. - _Rémy Sigrist_, Jan 11 2021
%H A336033 Rémy Sigrist, <a href="/A336033/b336033.txt">Table of n, a(n) for n = 1..10000</a>
%e A336033 The first terms, alongside the corresponding k's, are:
%e A336033   n   a(n)  k's
%e A336033   --  ----  -------
%e A336033    1     0  {}
%e A336033    2     1  {1}
%e A336033    3     0  {}
%e A336033    4     1  {3}
%e A336033    5     2  {1, 2}
%e A336033    6     0  {}
%e A336033    7     1  {6}
%e A336033    8     0  {}
%e A336033    9     1  {8}
%e A336033   10     2  {6, 7}
%e A336033   11     3  {1, 2, 5}
%e A336033   12     2  {8, 9}
%o A336033 (PARI) for (n=1, #a=vector(87), x=0; forstep (k=n-1, 1, -1, if (0==x=bitxor(x, a[k]), a[n]=1+a[k]; break)); print1 (a[n] ", "))
%Y A336033 Cf. A336190, A340488.
%K A336033 nonn,base
%O A336033 1,5
%A A336033 _Rémy Sigrist_, Jul 07 2020