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 A344531 #12 May 24 2021 07:54:23 %S A344531 0,1,4,5,2,3,6,7,32,33,36,37,34,35,38,39,16,17,20,21,18,19,22,23,48, %T A344531 49,52,53,50,51,54,55,8,9,12,13,10,11,14,15,40,41,44,45,42,43,46,47, %U A344531 24,25,28,29,26,27,30,31,56,57,60,61,58,59,62,63,512,513,516 %N A344531 a(n) = Sum_{k >= 0} b_k * 2^A061579(k) for any number n with binary expansion Sum_{k >= 0} b_k * 2^k. %C A344531 This sequence is a self-inverse permutation of the nonnegative integers. %C A344531 Fixed points correspond to A261195. %H A344531 Rémy Sigrist, <a href="/A344531/b344531.txt">Table of n, a(n) for n = 0..32767</a> %H A344531 Rémy Sigrist, <a href="/A344531/a344531.png">Scatterplot of the first 2^21 terms</a> %H A344531 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %H A344531 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A344531 a(n) = n iff n belongs to A261195. %F A344531 A000120(a(n)) = A000120(n). %F A344531 a(n) < 2^A000217(k) for any n < 2^A000217(k). %e A344531 For n = 42: %e A344531 - 42 = 2^1 + 2^3 + 2^5, %e A344531 - A061579(1) = 2, %e A344531 - A061579(3) = 5, %e A344531 - A061579(5) = 3, %e A344531 - so a(42) = 2^2 + 2^5 + 2^3 = 44. %o A344531 (PARI) a(n) = { my (v=0, e, t=0, w=1); while (n, n-=2^e=valuation(n, 2); while (e>t+w-1, t+=w; w++); v+=2^(2*t+w-1-e)); v } %Y A344531 Cf. A000120, A000217, A061579, A261195 (fixed points). %K A344531 nonn,base %O A344531 0,3 %A A344531 _Rémy Sigrist_, May 22 2021