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”).

a(0) = 0, and for any n >= 0, a(n+1) is the sum of the lengths of the runs of consecutive terms a(i), ..., a(j) with 0 <= i <= j <= n such that a(i) XOR ... XOR a(j) = a(n) (where XOR denotes the bitwise XOR operator).
3

%I #10 Dec 12 2022 12:14:46

%S 0,1,3,1,4,1,5,5,10,4,12,18,1,13,8,22,44,7,52,1,19,35,10,43,53,7,68,1,

%T 31,24,56,73,8,126,105,35,71,36,71,60,70,1,124,180,10,172,41,182,40,

%U 288,1,232,15,201,4,271,6,213,1,233,14,230,25,216,9,157,115

%N a(0) = 0, and for any n >= 0, a(n+1) is the sum of the lengths of the runs of consecutive terms a(i), ..., a(j) with 0 <= i <= j <= n such that a(i) XOR ... XOR a(j) = a(n) (where XOR denotes the bitwise XOR operator).

%C The sequence is unbounded (if the sequence was bounded, with greatest value m, then, by the pigeonhole principle, some value, say v, would appear infinitely many times, and the next value after the (m+1)-th occurrence of v would be > m, a contradiction).

%H Rémy Sigrist, <a href="/A358919/b358919.txt">Table of n, a(n) for n = 0..15722</a>

%H Rémy Sigrist, <a href="/A358919/a358919.txt">C program</a>

%H Rémy Sigrist, <a href="/A358919/a358919.png">Scatterplot of the first 350000 terms</a>

%e The first terms, alongside the corresponding pairs (i,j), are:

%e n a(n) (i,j)'s

%e -- ---- ---------------------------------

%e 0 0 N/A

%e 1 1 (0,0)

%e 2 3 (0,1), (1,1)

%e 3 1 (2,2)

%e 4 4 (0,1), (1,1), (3,3)

%e 5 1 (4,4)

%e 6 5 (0,1), (1,1), (3,3), (5,5)

%e 7 5 (3,4), (4,5), (6,6)

%e 8 10 (3,4), (4,5), (4,7), (6,6), (7,7)

%e 9 4 (6,8), (8,8)

%e 10 12 (3,5), (3,7), (4,4), (5,6), (9,9)

%e 11 18 (0,8), (1,8), (10,10)

%e 12 1 (11,11)

%o (C) See Links section.

%Y Cf. A358799, A358918.

%K nonn,base

%O 0,3

%A _Rémy Sigrist_, Dec 06 2022