login
A390505
a(n) = AN-run sequence of the n-th 01-word, where all 01-words are lexicographically ordered as in A076478; see Comments.
4
10, 11, 100, 1011, 1110, 101, 110, 10011, 101110, 10101, 11100, 111011, 10110, 111, 1000, 11011, 1001110, 100101, 1011100, 10111011, 1010110, 10111, 11110, 1110011, 11101110, 1110101, 101100, 1011011, 11110, 1001, 1010, 100011, 1101110, 110101, 10011100
OFFSET
1,1
COMMENTS
The AN-run (viz. Adjective-before-Noun) sequence of a 01-word (or binary representation, or vector of 0's and 1's) w, denoted by AN(w), is defined as follows: represent w as c(1) d(1) c(2) d(2) ..., where c(i) is the number of digits d(i) in the i-th run in w. Then AN(w) = [c(1)] d(1) [c(2)] d(2) ..., where [c(i)] is the base-2 representation of c(i). For NA-run sequences (Noun-before-Adjective), see A390508. For each w, the lengths of AN(w) and NA(w) are equal.
EXAMPLE
a(1) = AN(0) = 10 (one 0)
a(2) = AN(1) = 11 (one 1)
a(3) = AN(00) = 100 (two 0's)
a(8) = AN(001) = 10011 (two 0's and one 1)
For a(8), the "two" and "one" are adjectives (cardinals); the 0 and 1 are nouns (ordinals).
MATHEMATICA
f[w_] := StringJoin[Map[IntegerString[Length[#], 2] <> ToString[#[[1]]] &, Split[Characters[w]]]];
s[n_] := Map[StringJoin[Map[ToString, Rest[IntegerDigits[#, 2]]]] &, Range[2, 2^(n + 1) - 1]];
Map[f, s[5]]
Map[# <> " -> " <> f[#] &, s[3]] // ColumnForm
(* Peter J. C. Moses, Nov 05 2025 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Clark Kimberling, Dec 02 2025
STATUS
approved