login
A381662
a(n) = A380200(A378684(n)).
0
1, 2, 3, 4, 5, 6, 9, 8, 7, 10, 11, 14, 13, 12, 15, 20, 17, 18, 19, 16, 21, 22, 27, 24, 25, 26, 23, 28, 35, 30, 33, 32, 31, 34, 29, 36, 37, 44, 39, 42, 41, 40, 43, 38, 45, 54, 47, 52, 49, 50, 51, 48, 53, 46, 55, 56, 65, 58, 63, 60, 61, 62, 59, 64, 57, 66, 77, 68, 75, 70, 73, 72, 71, 74
OFFSET
1,2
COMMENTS
This sequence can be regarded as a triangular array read by rows. Each row is a permutation of a block of consecutive numbers; the blocks are disjoint and every positive number belongs to some block. The length of row n is 4n-3 = A016813(n+1), n > 0.
The sequence can also be regarded as a table read by upward antidiagonals. For n>1 row n joins two consecutive antidiagonals.
The sequence is a self-inverse permutation of the positive integers.
In particular, the initial {a(1),a(2), ... a(A000384(n+1))} is self-inverse.
The sequence is an intra-block permutation of the positive integers.
Generalization of the Cantor numbering method.
FORMULA
a(n) = A379342(A379343(n)).
T(n,k) for 1 <= k <= 4n - 3: T(n,k) = A000384(n-1) + P(n,k), P(n, k) = -k + m(n) - 1 if k < m(n) and k mod 2 = 1, P(n, k) = k if k < m(n) and k mod 2 = 0, P(n, k) = k if k >= m(n) and k mod 2 = 1, P(n, k) = -k + 3 * m(n) - 1 if k >= m(n) and k mod 2 = 0, where m(n) = 2n - 1.
EXAMPLE
Triangle array begins:
k= 1 2 3 4 5 6 7 8 9
n=1: 1;
n=2: 2, 3, 4, 5, 6;
n=3: 9, 8, 7, 10, 11, 14, 13, 12, 15;
(1,2,3... 12,15) = (1,2,3... 12,15)^(-1).
(1,2,3... 12,15) = (1,5,2, ...8,15)(1,3,5... 9,15). The first permutation is from Example A379342 and the second from Example A379343.
For n > 1, each row of triangle array joins two consecutive upward antidiagonals in the table:
1, 3, 6, 10, 15, ...
2, 5, 7, 12, 16, ...
4, 8, 13, 19, 26, ...
9, 14, 18, 25, 31, ...
11, 17, 24, 32, 41, ...
...
Subtracting (n-1)*(2*n-3) from each term in row n produces a permutation of numbers from 1 to 4*n-3:
1,
1, 2, 3, 4, 5;
3, 2, 1, 4, 5, 8, 7, 6, 9;
MATHEMATICA
T[n_, k_]:=(n-1)*(2*n-3)+Module[{m=2*n-1}, If[k<m, If[OddQ[k], -k+m-1, k], If[OddQ[k], k, -k+3*m-1]]]
Nmax=3; Flatten[Table[T[n, k], {n, 1, Nmax}, {k, 1, 4 n-3}]]
CROSSREFS
Cf. A016813 (row lengths), A000384, A378684, A380200, A379342, A379343.
Sequence in context: A055170 A068384 A222253 * A353591 A269838 A371985
KEYWORD
nonn,tabf,new
AUTHOR
Boris Putievskiy, Mar 03 2025
STATUS
approved