OFFSET

1,2

LINKS

Reed Kelly, Feb 15 2007, Table of n, a(n) for n = 1..555

EXAMPLE

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

MATHEMATICA

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 ]

CROSSREFS

KEYWORD

easy,nonn

AUTHOR

Reed Kelly, Feb 15 2007

STATUS

approved