login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 1
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
This notation is used by Penrose for specifying Turing machine examples. In general, this notation is much more compact than unary. Because no number encoded by this notation contains two or more consecutive 1's, there are an infinite number of additional strings available such as 110, 1110, 11110, ... for specifying delimiters (in lists of numbers), operations, etc. In some contexts, zero may alternately be represented by no symbol at all, for example, when there are two immediately-consecutive delimiters (commas).
REFERENCES
R. Penrose, The Emperor's New Mind, Oxford, 1989, pp. 42-46.
LINKS
EXAMPLE
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.
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 *)
PROG
(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
CROSSREFS
Cf. A007088.
Sequence in context: A267524 A259883 A242808 * A277916 A283088 A283141
KEYWORD
nonn,base
AUTHOR
Rick L. Shepherd, May 12 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 06:14 EDT 2024. Contains 371918 sequences. (Running on oeis4.)