%I #14 Jun 28 2023 08:22:38
%S 1,2,1,1,2,1,1,1,2,1,2,1,1,2,1,1,2,1,1,2,1,1,1,2,1,1,2,1,1,1,1,2,1,1,
%T 2,1,2,1,1,1,2,1,1,2,1,1,2,1,1,1,2,1,1,2,1,2,1,2,1,1,1,2,1,1,2,1,1,2,
%U 1,2,1,1,1,2,1,1,2,1,1,1,2,1,2,1,1,1,2,1,1
%N Triangle where n-th row is the first n terms of the sequence in reverse order, starting with a(1) = 1 and a(2) = 2.
%C Lim f(f(...f(n))) where f(n) is fractal sequence in A004736.
%H Clark Kimberling, <a href="http://faculty.evansville.edu/ck6/integer/fractals.html">Fractal sequences</a>
%H Clark Kimberling, <a href="http://matwbn.icm.edu.pl/ksiazki/aa/aa73/aa7321.pdf">Numeration systems and fractal sequences</a>, Acta Arithmetica 73 (1995) 103-117.
%e The triangle starts:
%e 1
%e 2 1
%e 1 2 1
%e 1 1 2 1
%e 2 1 1 2 1
%e 1 2 1 1 2 1
%e Since the sequence starts 1,2,1,1,2, row 5 is the reversal of that, 2,1,1,2,1.
%o (PARI) at(n)=local(r,k); r=vector(n*(n+1)\2); r[1]=r[3]=1; r[2]=2; k=4; for(i=3,n,for(j=1,i,r[k]=r[i-j+1];k++)); r /* Generates first n>1 rows of triangle. - _Franklin T. Adams-Watters_, Aug 08 2011. */
%Y Cf. A004736, A020907.
%K nonn,tabl
%O 1,2
%A _Clark Kimberling_