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 A065159 #19 Aug 05 2022 15:35:17 %S A065159 0,1,4,15,16,85,108,511,64,585,660,5819,816,7085,7644,65535,256,4369, %T A065159 4644,78451,5200,87381,91564,1531639,6336,105625,109876,1825659, %U A065159 118384,1961821,2029500,33554431,1024,33825,34884,1149155,37008,1217189,1250124,41056743 %N A065159 Binary string self-substitutions: a(n) is obtained by substituting the binary expansion of n for each 1-bit in the binary expansion of n. %H A065159 Paul Tek, <a href="/A065159/b065159.txt">Table of n, a(n) for n = 0..10000</a> %F A065159 a(0) = 0. a(2^n) = 4^n. a(4n+2) = (4n+2)*(1+a(4n+1)/(4n+1)). %F A065159 a(n) = A065157(n,n) = A065158(n,n)*n = A065160(n)*n. %F A065159 a(n) =z(n, n) with z(u, v) = if u=0 then 0 else if u mod 2 = 0 then z(u/2, v)*2 else z([u/2], v)*A062383(v)+v. - _Reinhard Zumkeller_, Feb 15 2004 %e A065159 a(5): 5 = 101 -> (101)0(101) = 1010101 = 85. %t A065159 bss[n_]:=Module[{idn2=IntegerDigits[n,2]},FromDigits[Flatten[idn2/.{1-> idn2}],2]]; Array[bss,40,0] (* _Harvey P. Dale_, Aug 15 2017 *) %o A065159 (Python) %o A065159 def a(n): b = bin(n)[2:]; return int(b.replace("1", b), 2) %o A065159 print([a(n) for n in range(40)]) # _Michael S. Branicky_, Aug 05 2022 %Y A065159 Cf. A007088, A065157, A065158, A065160. %K A065159 base,easy,nonn %O A065159 0,3 %A A065159 _Marc LeBrun_, Oct 18 2001 %E A065159 Name clarified by _Michael S. Branicky_, Aug 05 2022