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 A357522 #12 Oct 03 2022 14:55:27 %S A357522 0,1,2,3,6,5,4,7,8,11,10,9,16,17,18,15,12,13,14,19,32,23,22,21,24,31, %T A357522 28,27,26,29,30,25,20,33,42,49,48,43,44,47,50,41,34,37,38,53,52,39,36, %U A357522 35,40,51,46,45,74,75,84,65,58,59,64,85,86,63,60,57,66,83 %N A357522 Reverse run lengths in binary expansions of terms of A063037: for n >= 0, a(n) is the unique k such that A063037(1+k) = A056539(A063037(1+n)). %C A357522 This sequence is a self-inverse permutation of the nonnegative integers. %H A357522 Rémy Sigrist, <a href="/A357522/b357522.txt">Table of n, a(n) for n = 0..10944</a> %H A357522 Rémy Sigrist, <a href="/A357522/a357522.gp.txt">PARI program</a> %H A357522 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A357522 a(n) = n iff n = 0 or A044813(1+n) belongs to A044918. %e A357522 For n = 42: %e A357522 - A063037(1+42) = 86, %e A357522 - the binary expansion of 86 is "1010110", %e A357522 - reversing run lengths yields "1001010", %e A357522 - this corresponds to 74 = A063037(1+34), %e A357522 - hence a(42) = 34. %o A357522 (PARI) See Links section. %Y A357522 See A357523 for a similar sequence. %Y A357522 Cf. A044918, A056539, A063037. %K A357522 nonn,look,base %O A357522 0,3 %A A357522 _Rémy Sigrist_, Oct 02 2022