OFFSET
0,1
COMMENTS
This sequence is a binary variant of the "Look and Say" sequence A045918.
There is only one fixed point: a(7) = 7.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..8192
FORMULA
EXAMPLE
For n = 67:
- the binary representation of 67 is "1000011",
- we see, in binary: "1" "1", "100" "0", "10" "1",
- hence the binary representation of a(67) is "111000101",
- and a(67) = 453 in decimal.
PROG
(PARI) a(n, b=2) = if (n==0, return (b)); my (d=digits(b*n, b), v=0, w=0); d[#d] = -1; for (i=1, #d-1, w++; if (d[i]!=d[i+1], v = b*(v*b^#digits(w, b) + w) + d[i]; w = 0)); v
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Nov 10 2018
STATUS
approved