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!)
A318926 Take the binary expansion of n, starting with the least significant bit, and concatenate the lengths of the runs. 3
1, 11, 2, 21, 111, 12, 3, 31, 121, 1111, 211, 22, 112, 13, 4, 41, 131, 1121, 221, 2111, 11111, 1211, 311, 32, 122, 1112, 212, 23, 113, 14, 5, 51, 141, 1131, 231, 2121, 11121, 1221, 321, 3111 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Obviously this compressed notation is useful only for n < 1023. A227736 is a version which works for all n.
LINKS
Claude Lenormand, Deux transformations sur les mots, Preprint, 5 pages, Nov 17 2003. Apparently unpublished. This is a scanned copy of the version that the author sent to me in 2003. - N. J. A. Sloane, Sep 09 2018. See Procedure 1.
EXAMPLE
n, binary, run lengths, -> a(n)
1, [1], [1] -> 1
2, [0, 1], [1, 1] -> 11
3, [1, 1], [2] -> 2
4, [0, 0, 1], [2, 1] -> 21
5, [1, 0, 1], [1, 1, 1] -> 111
6, [0, 1, 1], [1, 2] -> 12
7, [1, 1, 1], [3] -> 3
8, [0, 0, 0, 1], [3, 1] -> 31,
...
PROG
(Python)
from itertools import groupby
def A318926(n): return int(''.join(str(len(list(g))) for k, g in groupby(bin(n)[:1:-1]))) # Chai Wah Wu, Mar 11 2022
CROSSREFS
Sequence in context: A262369 A092260 A370004 * A336874 A040120 A365220
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Sep 09 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 May 8 02:29 EDT 2024. Contains 372317 sequences. (Running on oeis4.)