%I #11 Oct 06 2013 14:47:19
%S 1,2,1,1,1,2,2,1,2,2,3,1,3,2,3,3,1,3,2,3,3,1,1,1,1,1,2,1,1,3,1,2,1,1,
%T 2,2,1,2,3,2,1,1,2,1,2,2,1,3,2,2,1,2,2,2,2,2,3,3,1,1,3,1,2,3,1,3,3,2,
%U 1,3,2,2,3,2,3,3,3,1,3,3,2,3,3,3,4
%N An enumeration of all k-tuples containing positive integers.
%C The sequence pattern is an integer, n, followed by all k-tuples containing n, then (k+1)-tuples, etc., up to the n-tuples that have not yet appeared in the sequence. Directly before the integer n+1, therefore, we find the first occurrence of n^n n-tuples which contain the n^n permutations of 1 to n in lexicographic order. The cases n = 1 and n = 2 are degenerate as no tuples precede them; 1 is followed not by a tuple, but by 2, and 2 is followed by the tuple (1, 1), rather than (1, n) as with all other integers.
%C k-tuple clusters later in the sequence (k<n, i.e., after the initial k^k) are in sizes n^k-(n-1)^k; for example, the 2-tuples, when they occur, always appear in odd number sized clusters (2n-1, excluding the first four), and excluding the first 3^3, 3-tuples occur in clusters of 3n^2-3n+1.
%C Essentially, at each stage an n-hypercube of elements of size n is completed for each dimension up to the (n-1)-th, building on previous occurrences of the dimension, and then a hypercube for dimension n is begun to be built upon later.
%C Tuple sizes are in A229895.
%H Carl R. White, <a href="/A229873/b229873.txt">Table of n, a(n) for n = 1..1235</a>
%H Carl R. White, <a href="/A229873/a229873.txt">Tabular layout of the sequence showing the k-tuples as they occur</a>
%e Sequence starts (1), (2), (1,1), (1,2), (2,1), (2,2), (3), (1,3), (2,3), (3,1), (3,2), (3,3), (1,1,1), ..., (3,3,3), (4), (1,4), etc.
%Y Cf. A001057. Sorted tuples only: A229874. Tuple sizes: A229895.
%K nonn,tabf
%O 1,2
%A _Carl R. White_, Oct 01 2013