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.

A292601 a(n) = n - A292600(n).

This page as a plain text file.
%I A292601 #12 Jun 30 2022 12:45:51
%S A292601 0,1,1,2,1,2,4,5,1,2,4,5,8,9,9,10,1,2,4,5,8,9,9,10,16,17,17,18,17,18,
%T A292601 20,21,1,2,4,5,8,9,9,10,16,17,17,18,17,18,20,21,32,33,33,34,33,34,36,
%U A292601 37,33,34,36,37,40,41,41,42,1,2,4,5,8,9,9,10,16,17,17,18,17,18,20,21,32,33,33,34,33,34,36,37,33,34,36,37,40,41,41,42,64,65,65
%N A292601 a(n) = n - A292600(n).
%H A292601 Antti Karttunen, <a href="/A292601/b292601.txt">Table of n, a(n) for n = 0..16383</a>
%H A292601 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A292601 a(n) = n - A292600(n) = n - A006068(floor(n/2)).
%t A292601 Table[n - If[n < 2, 0, BitXor @@ Table[Floor[#/2^m], {m, 0, Floor@ Log2@ #}] &@ Floor[n/2]], {n, 0, 98}] (* _Michael De Vlieger_, Sep 21 2017 *)
%o A292601 (Python)
%o A292601 def A292601(n):
%o A292601     k, m = n>>1, n>>2
%o A292601     while m > 0:
%o A292601         k ^= m
%o A292601         m >>= 1
%o A292601     return n-k # _Chai Wah Wu_, Jun 30 2022
%Y A292601 Cf. A006068, A292600.
%K A292601 nonn,base
%O A292601 0,4
%A A292601 _Antti Karttunen_, Sep 21 2017