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 A322149 #14 Dec 07 2018 12:15:24 %S A322149 0,1,2,15,16,5,30,511,512,33,10,47,240,61,1022,65535,65536,1025,66, %T A322149 271,80,21,94,1535,7680,481,122,495,8176,2045,131070,33554431, %U A322149 33554432,131073,2050,8207,528,133,542,8703,2560,161,42,175,752,189,3070,196607,983040 %N A322149 In the binary representation of n, replace each run of k 0's (or 1's) with k^2 0's (or 1's). %C A322149 This sequence has similarities with A001196: here we square the length of each run of consecutive equal bits, there we double it. %H A322149 Rémy Sigrist, <a href="/A322149/b322149.txt">Table of n, a(n) for n = 0..16383</a> %H A322149 <a href="http://oeis.org/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %F A322149 a(n) = A322403(n, n). %F A322149 a(n) >= n with equality iff n belongs to A000975. %F A322149 a(2^n) = 2^(n^2) for any n >= 0. %F A322149 a(2^n - 1) = 2^(n^2) - 1 for any n >= 0. %F A322149 A005811(a(n)) = A005811(n). %t A322149 squareList[v_] := Flatten[ConstantArray[v, {Length[v]}]]; a[n_] := FromDigits[ Flatten[squareList /@ Split[IntegerDigits[n, 2]]], 2]; Array[a, 60, 0] (* _Amiram Eldar_, Dec 07 2018*) %o A322149 (PARI) a(n) = if (n==0, 0, my (b=n%2, k=valuation(n+b,2)); (a(n\2^k) + b) * 2^(k^2) - b) %Y A322149 Cf. A000975, A001196, A005811, A322403. %K A322149 nonn,base %O A322149 0,3 %A A322149 _Rémy Sigrist_, Nov 28 2018