OFFSET
1,1
COMMENTS
The NA-run sequence of a 01-word (or binary representation, or vector of 0's and 1's), w, denoted by NA(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 NA(w) = d(1) [c(1)] d(2) [c(2)] ..., where [c(i)] is the binary representation of c(i). For AN-run sequences, see A390505. For each w, the lengths of AN(w) and NA(w) are equal.
EXAMPLE
The first seven 01-words are 0, 1, 00, 01, 10, 11, 000. Starting with the first word, 0, we have c(1) = 1 and d(1) = 0, so that NA(0) = 01, which is the fourth 01-word in the sequence (0,1,00,01,10,11,000,...). The NA-run sequence of the n-th 01 word, for n>=1, is (01, 11, 010, 0111, 1101, 110, 011, 01011, 011101, 01110, 11010, 110111, 11001, 111, 0100, 01111, 0101101, 010110, 0111010, 01110111, 0111001, 01111, 11011, 1101011, 11011101, 1101110, 110010, 1100111, 11101, 1100, ...). Using the lexicographic ordering of all 01 words as in A076478, the indices of the words 01, 11, 010, ... are 4, 6, 9, ... .
a(1) = 4, which is the index of (NA(0) = 01) (0 one time; i.e., the noun is 0, and the adjective is 1.)
a(2) = 6, the index of (NA(1) = 11) (1 one time)
a(3) = 9, the index of (NA(00) = 010) (0 two times)
a(8) = 42, the index of (NA(001) = 01011) (0 twice and 1 once; i.e. 0 and 1 are nouns (ordinals), and "twice" and "once" are adjectives (cardinals)).
MATHEMATICA
Map[2^Length[#] - 2 + FromDigits[#, 2] + 1 &,
Map[Flatten[{First[#], IntegerDigits[Length[#], 2]} & /@ Split[#]] &,
Flatten[Map[Tuples[{0, 1}, {#}] &, Range[6]], 1]]]
(* Peter J. C. Moses, Dec 17 2025 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Dec 04 2025
STATUS
approved
