login
At the n-th iteration the sequence of integers from n down to 1 are appended to the sequence a(n) times.
1

%I #6 Mar 08 2015 20:38:10

%S 1,2,1,2,1,3,2,1,4,3,2,1,4,3,2,1,5,4,3,2,1,6,5,4,3,2,1,6,5,4,3,2,1,6,

%T 5,4,3,2,1,7,6,5,4,3,2,1,7,6,5,4,3,2,1,8,7,6,5,4,3,2,1,9,8,7,6,5,4,3,

%U 2,1,9,8,7,6,5,4,3,2,1,9,8,7,6,5,4,3,2,1,9,8,7,6,5,4,3,2,1,10,9,8,7,6,5,4,3

%N At the n-th iteration the sequence of integers from n down to 1 are appended to the sequence a(n) times.

%H Reed Kelly, Feb 15 2007, <a href="/A128118/b128118.txt">Table of n, a(n) for n = 1..555</a>

%e a(4) = 2 so 4,3,2,1,4,3,2,1 is added to the end of the sequence at the fourth iteration.

%t crr[n_] := Module[ { A = {1,2,1,2,1}, i, j }, For [ i = 3, i <= n, i++, A = Join[ A, Flatten[ Table[ Range[i,1,-1], {A[[i]]} ]]]; ]; A ]

%Y Cf. A128117, A001462, A002260.

%K easy,nonn

%O 1,2

%A _Reed Kelly_, Feb 15 2007