login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Irregular triangle read by rows: the n-th row gives the row indices of the matrix of 1..n^2 filled successively back and forth along antidiagonals.
2

%I #17 Jul 01 2021 08:22:59

%S 1,1,1,2,2,1,1,2,3,2,1,2,3,3,1,1,2,3,2,1,1,2,3,4,4,3,2,3,4,4,1,1,2,3,

%T 2,1,1,2,3,4,5,4,3,2,1,2,3,4,5,5,4,3,4,5,5,1,1,2,3,2,1,1,2,3,4,5,4,3,

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

%N Irregular triangle read by rows: the n-th row gives the row indices of the matrix of 1..n^2 filled successively back and forth along antidiagonals.

%H Stefano Spezia, <a href="/A343853/b343853.txt">First 30 rows of the triangle, flattened</a>

%e The triangle begins:

%e 1

%e 1 1 2 2

%e 1 1 2 3 2 1 2 3 3

%e 1 1 2 3 2 1 1 2 3 4 4 3 2 3 4 4

%e ...

%t a={};For[n=1,n<=6,n++,For[d=1,d<=n,d++, If[OddQ[d],i=d;For [k=1,k<=d,k++, AppendTo[a,i-k+1]],i=1;For[k=1,k<=d,k++, AppendTo[a,i+k-1]]]];For[d=n+1,d<=2n-1,d++, If[OddQ[d],i= n; For[k=1,k<=2n-d,k++,AppendTo[a,i-k+1]],If[EvenQ[d],i=d-n+1;For[k=1,k<=2n-d,k++, AppendTo[a,i+k-1]]]]]]; a

%Y Cf. A000290 (row length), A002411 (row sums), A060747 (number of antidiagonals), A078475, A319573, A343854 (column indices).

%K nonn,look,tabf

%O 1,4

%A _Stefano Spezia_, May 01 2021