login
A375602
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.
10
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, 42, 46, 23, 27, 31, 35, 39, 43, 47, 50, 24, 28, 32, 36, 40, 44, 48, 51, 53, 25, 29, 33, 37, 41, 45, 49, 52, 54, 55
OFFSET
1,2
COMMENTS
The sequence is an intra-block permutation of positive integers.
Generalization of the Cantor numbering method for n (n > 1) adjacent diagonals. In this approach, the block number n combines n neighboring diagonals.
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.
FORMULA
Linear sequence:
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),
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.
Triangular array T(n,k) for 1 <= k <= n(n^2+1)/2 (see Example):
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].
EXAMPLE
Triangle begins:
k = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
n=1: 1;
n=2: 2, 4, 3, 5, 6;
n=3: 7, 10, 13, 16, 8, 11, 14, 17, 19, 9, 12, 15, 18, 20, 21;
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:
1,
1, 3, 2, 4, 5,
1, 4, 7, 10, 2, 5, 8, 11, 13, 3, 6, 9, 12, 14, 15,
...
The triangle's rows of permutations can be arranged as n successive upward antidiagonals in an array:
1, 3, 5, 10, 13, 15, ...
1, 4, 7, 11, 14, ...
2, 4, 8, 12, ...
1, 5, 9, ...
2, 6, ...
3, ...
MATHEMATICA
a[n_]:=Module[{L, Ld, Rd, P, Result}, L=Ceiling[(Sqrt[4*Sqrt[8*n+1]-3]-1)/2];
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]
Nmax= 21; Table[a[n], {n, 1, Nmax}]
CROSSREFS
Cf. A002024, A002260, A002817, A006003 (row lengths),
Sequence in context: A131042 A274631 A368181 * A275335 A056019 A125963
KEYWORD
nonn,tabf
AUTHOR
Boris Putievskiy, Aug 20 2024
STATUS
approved