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.

A375183 In the binary expansion of n, complement bits at even positions and to the right of a 1 (the most significant bit corresponding to position 1).

This page as a plain text file.
%I A375183 #10 Aug 06 2024 16:38:37
%S A375183 0,1,3,2,6,7,4,5,12,13,15,14,8,9,11,10,24,25,26,27,30,31,28,29,16,17,
%T A375183 18,19,22,23,20,21,48,49,51,50,52,53,55,54,60,61,63,62,56,57,59,58,32,
%U A375183 33,35,34,36,37,39,38,44,45,47,46,40,41,43,42,96,97,98,99
%N A375183 In the binary expansion of n, complement bits at even positions and to the right of a 1 (the most significant bit corresponding to position 1).
%C A375183 This sequence is a self-inverse permutation of the nonnegative integers.
%H A375183 Rémy Sigrist, <a href="/A375183/b375183.txt">Table of n, a(n) for n = 0..8191</a>
%H A375183 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%H A375183 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A375183 a(floor(n/2)) = floor(a(n)/2).
%e A375183 For n = 9: the binary expansion of 9 is "1001": the bit at position 2 (0) sits to the right of a 1 so we complement it, the bit at position 4 (1) sits to the right of a 0 so we keep it; the binary expansion of a(9) is "1101" and a(9) = 13.
%o A375183 (PARI) a(n) = { my (b = binary(n)); forstep (k = 2, #b, 2, if (b[k-1], b[k] = 1-b[k];);); fromdigits(b, 2); }
%Y A375183 Cf. A063946, A165199, A375184.
%K A375183 nonn,base
%O A375183 0,3
%A A375183 _Rémy Sigrist_, Aug 03 2024