login
Triangle read by rows, where row n is a block of length n*(n^2 + 1)/2, which is a permutation of the numbers of its constituents; see Comments.
2

%I #7 Sep 13 2024 07:28:49

%S 1,2,4,3,5,6,7,10,13,16,8,11,14,17,19,9,12,15,18,20,21,22,26,30,34,38,

%T 42,46,23,27,31,35,39,43,47,50,24,28,32,36,40,44,48,51,53,25,29,33,37,

%U 41,45,49,52,54,55

%N Triangle read by rows, where row n is a block of length n*(n^2 + 1)/2, which is a permutation of the numbers of its constituents; see Comments.

%C The sequence is an intra-block permutation of positive integers.

%C Generalization of the Cantor numbering method for n (n > 1) adjacent diagonals. In this approach, the block number n combines n neighboring diagonals.

%C Each block is filled sequentially, starting from the top of the leftmost vertical strip and moving downwards and then rightwards to the next strip. In block number n the first (n - 1)*n/2 + 1 strips each have a length of n. The remaining n - 1 strips have lengths that decrease sequentially from n - 1 down to 1. See Example the array of permutations of the triangle read upward antidiagonals.

%H Boris Putievskiy, <a href="/A375602/b375602.txt">Table of n, a(n) for n = 1..9316</a>

%H Boris Putievskiy, <a href="https://arxiv.org/abs/2310.18466">Integer Sequences: Irregular Arrays and Intra-Block Permutations</a>, arXiv:2310.18466 [math.CO], 2023.

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>.

%F Linear sequence:

%F a(n) = P(n) + (L(n) - 1)*L*(L(n)^2 - L(n) + 2)/8, where L(n) =ceiling((sqrt(4*Sqrt(8*n + 1) - 3) - 1)/2), Ld(n) = ceiling((Sqrt(8*n + 1) - 1)/2), Ld(n) = A002024(n), Rd(n) = n - (Ld(n) - 1)*Ld(n)/2, Rd(n) = A002260(n),

%F P(n) = L(n)*Rd(n) + Ld(n) - L(n)*(L(n) + 1)/2 - Max[Rd(n) - (L(n)^2 - L(n) + 2)/2, 0]*(Max[Rd(n) - (L(n)^2 - L(n) + 2)/2, 0] + 1)/2.

%F Triangular array T(n,k) for 1 <= k <= n(n^2+1)/2 (see Example):

%F T(n,k) = (n - 1)*n*(n^2 - n + 2)/8 + P(n,k), T(n,k) = A002817(n-1) + P(n,k), where P(n,k) = n*Rd(n,k) + Ld(n,k) - n - Max[Rd(n,k) - (n^2 - n + 2)/2, 0]*(Max[Rd(n,k) - (n^2 - n + 2)/2, 0] + 1)/2, where Ld(n,k) = Ceiling[(Sqrt[(n^2 - n + 1)^2 + 8*k] - (n^2 - n + 1))/2].

%e Triangle begins:

%e k = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

%e n=1: 1;

%e n=2: 2, 4, 3, 5, 6;

%e n=3: 7, 10, 13, 16, 8, 11, 14, 17, 19, 9, 12, 15, 18, 20, 21;

%e Subtracting (n - 1)*n*(n^2-n+2)/8 from each term in row n is a permutation of 1 .. n(n^2+1)/2:

%e 1,

%e 1, 3, 2, 4, 5,

%e 1, 4, 7, 10, 2, 5, 8, 11, 13, 3, 6, 9, 12, 14, 15,

%e ...

%e The triangle's rows of permutations can be arranged as n successive upward antidiagonals in an array:

%e 1, 3, 5, 10, 13, 15, ...

%e 1, 4, 7, 11, 14, ...

%e 2, 4, 8, 12, ...

%e 1, 5, 9, ...

%e 2, 6, ...

%e 3, ...

%t a[n_]:=Module[{L,Ld,Rd,P,Result},L=Ceiling[(Sqrt[4*Sqrt[8*n+1]-3]-1)/2];

%t Ld=Ceiling[(Sqrt[8*n+1]-1)/2]; Rd=n-(Ld-1)*Ld/2; P=L*Rd+Ld-L*(L+1)/2-Max[Rd-(L^2-L+2)/2,0]*(Max[Rd-(L^2-L+2)/2,0]+1)/2; Result=P+(L-1)*L*(L^2-L+2)/8; Result]

%t Nmax= 21; Table[a[n],{n,1,Nmax}]

%Y Cf. A002024, A002260, A002817, A006003 (row lengths),

%K nonn,tabf

%O 1,2

%A _Boris Putievskiy_, Aug 20 2024