A191654 First repeating AN iterates. The AN (Adjective-before-Noun) function of a finite sequence s of nonnegative integers is the finite sequence a,0,b,1,c,2,...m,z, where a=#0's in s, b=#1's in s,..., m=#z's in s, where m is the greatest term in s.
1, 0, 2, 1, 3, 2, 2, 3, 1, 0, 3, 1, 1, 2, 3, 3, 1, 0, 3, 1, 1, 2, 3, 3, 1, 0, 3, 1, 2, 2, 3, 3, 1, 4, 1, 0, 4, 1, 2, 2, 2, 3, 2, 4, 1, 5, 1, 0, 5, 1, 2, 2, 2, 3, 1, 4, 2, 5, 1, 6, 1, 0, 5, 1, 4, 2, 1, 3, 1, 4, 1, 5, 2, 6, 1, 7, 1, 0, 6, 1, 4, 2, 1, 3, 1, 4, 1, 5, 1, 6, 2, 7, 1, 8
Offset: 1
Keywords
Crossrefs
Cf. A109973.
Programs
-
Mathematica
(* Program computes the AN segment starting with 0. *) adjectiveNoun[s_] := Flatten@Transpose@({(Count[s, #1] &) /@ #1, #1} &)[Range[0, Max[s]]]; NestList[adjectiveNoun[#1] &, adjectiveNoun[{0}], 7] (* Next program, the AN segment starting with 1. *) adjectiveNoun[s_] := Flatten@Transpose@({(Count[s, #1] &) /@ #1, #1} &)[Range[0, Max[s]]]; NestList[adjectiveNoun[#1] &, adjectiveNoun[{1}], 7] (* ...and so on. By Peter J. C. Moses, Jun 03 2011 *)
Comments