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 A340667 #20 Jan 29 2021 18:58:02 %S A340667 0,1,4,3,256,65,192,7,16777216,524289,2098176,8195,50331648,49153, %T A340667 114688,15,18446744073709551616,4503599627370497,36028797019226112, %U A340667 1099511627779,2305844108725321728,17592190238721,70368756760576,67108871,14167099448608935641088 %N A340667 a(n) is derived from n by replacing each 0 in its binary representation with a string of n 0's. %H A340667 Alois P. Heinz, <a href="/A340667/b340667.txt">Table of n, a(n) for n = 0..500</a> %F A340667 a(n) = n <=> n in { A000225 }. %F A340667 a(n) = n^n <=> n in { A000079 }. %F A340667 A000120(a(n)) = A000120(n). %F A340667 A023416(a(n)) = n * A023416(n) for n >= 1. %p A340667 a:= n-> Bits[Join](subs(0=[0$n][], Bits[Split](n))): %p A340667 seq(a(n), n=0..25); %p A340667 # second Maple program: %p A340667 b:= proc(n, k) option remember; `if`(n<2, n, %p A340667 `if`(irem(n, 2, 'r')=1, b(r, k)*2+1, b(r, k)*2^k)) %p A340667 end: %p A340667 a:= n-> b(n$2): %p A340667 seq(a(n), n=0..25); %o A340667 (Python) %o A340667 def A340667(n): %o A340667 return 0 if n == 0 else int(bin(n)[2:].replace('0','0'*n),2) # _Chai Wah Wu_, Jan 29 2021 %Y A340667 Main diagonal of A340666. %Y A340667 Cf. A000079, A000120, A000225, A023416, A057156. %K A340667 nonn,look,base %O A340667 0,3 %A A340667 _Alois P. Heinz_, Jan 15 2021