A304453 An expanded binary notation for n: the normal binary expansion for n is expanded by mapping each 1 to 10 and retaining the existing 0's.
0, 10, 100, 1010, 1000, 10010, 10100, 101010, 10000, 100010, 100100, 1001010, 101000, 1010010, 1010100, 10101010, 100000, 1000010, 1000100, 10001010, 1001000, 10010010, 10010100, 100101010, 1010000, 10100010, 10100100, 101001010, 10101000, 101010010, 101010100, 1010101010, 1000000, 10000010, 10000100
Offset: 0
Examples
a(3) = 1010 because 3 in binary is A007088(3) = 11 and each 1 has been replaced by 10 here. Similarly, a(4) = 1000 because A007088(4) = 100 and the expansion adds another 0 after the 1.
References
- R. Penrose, The Emperor's New Mind, Oxford, 1989, pp. 42-46.
Links
- Rick L. Shepherd, Table of n, a(n) for n = 0..9999
Crossrefs
Cf. A007088.
Programs
-
Maple
a:= n-> (l-> parse(cat(seq(10*l[-i], i=1..nops(l)))))(convert(n, base, 2)): seq(a(n), n=0..42); # Alois P. Heinz, Jan 08 2021
-
Mathematica
Table[FromDigits[Flatten[IntegerDigits[n,2]/.(1->{1,0})]],{n,0,40}] (* Harvey P. Dale, Sep 07 2019 *)
-
PARI
{a(n) = my(B, k); if(n >= 0, B = List(binary(n)); k = 1; while(k <= #B, if(B[k] == 1, k++; listinsert(B, 0, k)); k++); sum(k = 1, #B, B[k]*(10^(#B - k))))}
-
Python
def a(n): return int(bin(n)[2:].replace('1', '10')) print([a(n) for n in range(35)]) # Michael S. Branicky, Jan 08 2021
Comments