%I #11 Sep 13 2024 07:29:16
%S 1,3,1,2,2,6,4,3,2,10,5,4,4,2,1,6,9,3,8,14,1,10,6,5,4,3,20,28,8,7,1,6,
%T 12,3,2,36,9,8,7,5,5,18,26,2,1,7,5,20,7,10,5,4,34,44,1
%N Table T(n, k) read by upward antidiagonals. The sequences in each column k is a triangle read by rows, where each row is a permutation of the numbers of its constituents; see Comments.
%C Generalization of the Cantor numbering method for k (k > 1) adjacent diagonals. In this approach, column number k combines k neighboring diagonals. Block number n in column k has length k^2*n - k*(k-1)/2 = A360665(n,k) for n, k > 0.
%C A208234 presents an algorithm for generating permutations, where each generated permutation is self-inverse.
%C The sequence in each column k possesses two properties: it is both a self-inverse permutation and an intra-block permutation of natural numbers.
%H Boris Putievskiy, <a href="/A375725/b375725.txt">Table of n, a(n) for n = 1..9870</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 T(n,k) = P(n,k) + k*(L(n,k) - 1)*(k*(L(n,k) - 1) + 1)/2 = P(n,k) + A342719(L(n,k) - 1,k)), where L(n,k) = ceiling((sqrt(8*n+1)-1)/(2*k)), R(n,k) = n - k*(L(n,k)-1)*(k*(L(n,k)-1)+1)/2, P(n,k) = - max(R(n,k) , k^2*L(n,k) - k(k-1)/2 + 1 - R(n,k) ) * ((-1)^R(n,k) - 1) / 2 + min(R(n,k) , k^2*L(n,k) - k(k-1)/2 + 1 - R(n,k) ) * ((-1)^R(n,k) + 1) / 2 if 2R(n,k) ≥k^2*L - k(k-1)/2 + 1, P(n,k) = max(R(n,k) , k^2*L(n,k) - k(k-1)/2 + 1 - R(n,k) ) * ((-1)^(k^2*L(n,k) - k(k-1)/2 + 1 - R) + 1) / 2 - min(R, k^2*L(n,k) - k(k-1)/2 + 1 - R) * ((-1)^(k^2*L(n,k) - k(k-1)/2 + 1 - R(n,k) ) - 1) / 2 if 2R < k^2*L(n,k) - k(k-1)/2. + 1.
%e Table begins:
%e k= 1 2 3 4 5 6
%e ------------------------------------
%e n= 1: 1, 1, 6, 10, 1, 1, ...
%e n= 2: 3, 2, 2, 2, 14, 20, ...
%e n= 3: 2, 3, 4, 8, 3, 3, ...
%e n= 4: 4, 4, 3, 4, 12, 18, ...
%e n= 5: 5, 9, 5, 6, 5, 5, ...
%e n= 6: 6, 6, 1, 5, 10, 16, ...
%e n= 7: 10, 7, 7, 7, 7, 7, ...
%e n= 8: 8, 8, 20, 3, 8, 14, ...
%e n= 9: 9, 5, 9, 9, 9, 9, ...
%e n=10: 7, 10, 18, 1, 6, 12, ...
%e n=11: 11, 11, 11, 36, 11, 11, ...
%e n=12: 14, 20, 16, 12, 4, 10, ...
%e n=13: 13, 13, 13, 34, 13, 13, ...
%e n=14: 12, 18, 14, 14, 2, 8, ...
%e n=15: 15, 15, 15, 32, 15, 15, ...
%e n=16: 21, 16, 12, 16, 55, 6, ...
%e n=17: 17, 17, 17, 30, 17, 17, ...
%e n=18: 19, 14, 10, 18, 53, 4, ...
%e n=19: 18, 19, 19, 28, 19, 19, ...
%e n=20: 20, 12, 8, 20, 51, 2, ...
%e n=21: 16, 21, 21, 26, 21, 21, ...
%e ... .
%e In column 2, the first 3 blocks have lengths 3,7 and 11. In column 3, the first 2 blocks have lengths 6 and 15. In column 6, the first block has a length of 21.
%e Each block is a permutation of the numbers of its constituents.
%e The first 6 antidiagonals are:
%e 1;
%e 3, 1;
%e 2, 2, 6;
%e 4, 3, 2, 10;
%e 5, 4, 4, 2, 1;
%e 6, 9, 3, 8, 14, 1;
%t T[n_,k_]:=Module[{L,R,P,result},L=Ceiling[(Sqrt[8*n+1]-1)/(2*k)]; R=n-k*(L-1)*(k(L-1)+1)/2; If[2*R>=k^2*L-k*(k-1)/2+1,P=-Max[R,k^2*L-k*(k-1)/2+1-R]*((-1)^R-1)/2+Min[R,k^2*L-k*(k-1)/2+1-R]*((-1)^R+1)/2,P=Max[R,k^2*L-k*(k-1)/2+1-R]*((-1)^(k^2*L-k*(k-1)/2+1-R)+1)/2-Min[R,k^2*L-k*(k-1)/2+1-R]*((-1)^(k^2*L-k*(k-1)/2+1-R)-1)/2]; result=P+k*(L-1)*(k*(L-1)+1)/2]
%t Nmax=21; Table[T[n,k],{n,1,Nmax},{k,1,Nmax}]
%Y Cf. A208234, A342719, A360665.
%K nonn,tabl
%O 1,2
%A _Boris Putievskiy_, Aug 25 2024