A072464 Code word lengths for non-redundant MML code for positive integers.
1, 3, 3, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13
Offset: 1
Examples
Code words: 1, 010, 011, 000100, 000101, 000110, 000111, ...
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
- Lloyd Allison, Integer Distribution.
- Wikipedia, Elias omega coding
Programs
-
PARI
a(n) = local(l); if( n<2, n>0, l = length( binary(n)); l + a(l-1))
Comments