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 A344511 #13 May 24 2021 07:54:33 %S A344511 0,1,1,1,1,1,1,1,1,1,2,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,2,3,3,3, %T A344511 3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3, %U A344511 3,3,2,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3 %N A344511 a(n) = Sum_{k >= 0} sign(d_k) * 2^k for any number n with decimal expansion Sum_{k >= 0} d_k * 10^k. %C A344511 The binary expansion of a(n) encodes the nonzero digits of the decimal expansion of n. %H A344511 Rémy Sigrist, <a href="/A344511/b344511.txt">Table of n, a(n) for n = 0..8191</a> %F A344511 a(n) belongs to A140900 iff n belongs to A343452. %F A344511 a(A007088(n)) = n. %e A344511 For n = 20!: %e A344511 - 2432902008176640000 is the decimal expansion of 20!, so %e A344511 1111101001111110000 is the binary expansion of a(20!), %e A344511 - a(20!) = 513008. %o A344511 (PARI) a(n) = fromdigits(apply(sign, digits(n)), 2) %o A344511 (Python) %o A344511 def a(n): return int("".join((('1' if d!='0' else '0') for d in str(n))), 2) %o A344511 print([a(n) for n in range(87)]) # _Michael S. Branicky_, May 22 2021 %Y A344511 Cf. A007088, A140900, A289831 (base-3 analog), A343452. %K A344511 nonn,base %O A344511 0,11 %A A344511 _Rémy Sigrist_, May 21 2021