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.
%I A227987 #16 Jan 01 2025 22:13:05 %S A227987 1,2,3,4,5,12,7,8,19,10,11,6,51,56,15,16,71,76,9,20,21,44,23,48,13, %T A227987 204,25,112,455,240,31,32,271,568,143,38,307,18,79,40,83,42,43,22,179, %U A227987 184,47,24,783,26,27,102,819,50,207,14,1807,3640,911,120,3855 %N A227987 If the run lengths of the binary representation of n are [1+r_1, 1+r_2, 1+r_3, ..., 1+r_k], then those of a(n) are [1+(r_1), 1+(r_1 XOR r_2), 1+(r_1 XOR r_2 XOR r_3), ..., 1+(r_1 XOR ... XOR r_k)], where XOR denotes the XOR binary operator. %C A227987 This is a permutation of the natural numbers with inverse permutation A225607. %C A227987 The sequence (n, a(n), a(a(n)), a(a(a(n))),...) is periodic for any n. %C A227987 The run lengths of the binary representation of a fixed point are of the form [1, 1,...,1, K] (any number of ones followed by any number). %H A227987 Paul Tek, <a href="/A227987/b227987.txt">Table of n, a(n) for n = 1..10000</a> %H A227987 Paul Tek, <a href="/A227987/a227987.txt">Perl program for this sequence</a> %H A227987 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %e A227987 For n=927: %e A227987 (1) binary representation of n = "1110011111", %e A227987 (2) run lengths of n = [1+2,1+1,1+4], %e A227987 (3) run lengths of a(n) = [1+(2),1+(2 XOR 1),1+(2 XOR 1 XOR 4)]=[3,4,8], %e A227987 (4) binary representation of a(n) = "111000011111111", %e A227987 (5) a(n) = 28927. %o A227987 (Perl) # See Tek link. %Y A227987 Cf. A056539, A226532, A225607 (inverse). %K A227987 nonn,base %O A227987 1,2 %A A227987 _Paul Tek_, Aug 02 2013