OFFSET
2,2
COMMENTS
In A007931, the arithmetic is done from right to left, yielding reversals of the terms of A081242. In A007931, new wordlengths occur at 1,3,7,15,...; in A081242, they occur at 2,4,8,16,.... In A007931, indexing starts at 1 and the sequence is numerical; in A081242, indexing starts at 2, leaving room for the empty word at position 1 and the sequence consists of all binary words.
FORMULA
Write n in base 2, remove initial 1, add 1 to remaining digits and reverse their order. Or, start with empty word e, follow by 1 and then successively add 1, always working from left to right.
EXAMPLE
Eleven in base 2 is 1011; remove initial 1 to have 011; add 1 to all digits to have 122; reverse those to have a(11)=221. Or, start with the empty word and add 1's successively, using digits 1 and 2, and doing the arithmetic from left to right:
e -> 1 -> 2 -> 11 -> 21 -> 12 -> 22 -> 111 -> 211 -> 121 -> 221
CROSSREFS
KEYWORD
base,nonn,word
AUTHOR
Clark Kimberling, Mar 12 2003
EXTENSIONS
Example edited by Franklin T. Adams-Watters, Jan 25 2010
STATUS
approved