login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A344841 a(n) is the least positive number not of the form a(k) XOR ... XOR a(m) with 1 <= k <= m < n (where XOR denotes the bitwise XOR operator). 1

%I #8 Jun 02 2021 22:13:48

%S 1,2,4,5,8,12,14,16,17,19,20,21,23,32,33,35,48,49,51,56,57,59,64,65,

%T 67,68,69,71,76,77,79,80,81,83,84,85,87,92,93,95,128,129,131,132,133,

%U 135,140,141,143,192,193,195,196,197,199,204,205,207,224,225,227

%N a(n) is the least positive number not of the form a(k) XOR ... XOR a(m) with 1 <= k <= m < n (where XOR denotes the bitwise XOR operator).

%C This sequence has similarities with A002048; here we use XOR, there addition.

%C All powers of 2 appear.

%H Rémy Sigrist, <a href="/A344841/b344841.txt">Table of n, a(n) for n = 1..10000</a>

%F Apparently, a(A246360(k)) = 2^(k-1) for any k > 0.

%e n a(n) a(k) XOR ... XOR a(n) for k=1..n

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

%e 1 1 1

%e 2 2 3, 2

%e 3 4 7, 6, 4

%e 4 5 2, 3, 1, 5

%e 5 8 10, 11, 9, 13, 8

%e 6 12 6, 7, 5, 1, 4, 12

%e 7 14 8, 9, 11, 15, 10, 2, 14

%e 8 16 24, 25, 27, 31, 26, 18, 30, 16

%e 9 17 9, 8, 10, 14, 11, 3, 15, 1, 17

%e 10 19 26, 27, 25, 29, 24, 16, 28, 18, 2, 19

%o (PARI) s=2^0; for (n=1, #a=vector(61), print1 (a[n]=valuation(s+1, 2)", "); z=0; forstep (k=n, 1, -1, s=bitor(s, 2^z=bitxor(z,a[k]))))

%Y Cf. A002048, A246360.

%K nonn,base

%O 1,2

%A _Rémy Sigrist_, May 29 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 30 19:35 EDT 2023. Contains 365793 sequences. (Running on oeis4.)