login
A380817
a(n) = A380245(A379343(n)).
1
1, 2, 3, 4, 5, 6, 9, 10, 7, 8, 11, 12, 13, 14, 15, 20, 21, 18, 19, 16, 17, 22, 23, 24, 25, 26, 27, 28, 35, 36, 33, 34, 31, 32, 29, 30, 37, 38, 39, 40, 41, 42, 43, 44, 45, 54, 55, 52, 53, 50, 51, 48, 49, 46, 47, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 77, 78, 75, 76, 73, 74, 71, 72
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
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 + m(n) + 1 if k < m(n) and k mod 2 = 0, P(n, k) = k if k >= m(n), where m(n) = 2*n - 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, 10, 7, 8, 11, 12, 13, 14, 15;
For n > 1, each row of triangle array joins two consecutive upward antidiagonals in the table:
1, 3, 6, 8, 15, ...
2, 5, 7, 14, 16, ...
4, 10, 13, 19, 26, ...
9, 12, 18, 25, 31, ...
11, 21, 24, 34, 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, 4, 1, 2, 5, 6, 7, 8, 9;
All permutations are self-inverse.
MATHEMATICA
T[n_, k_]:=(n-1)*(2*n-3)+Module[{m=2*n-1}, If[k<m, If[OddQ[k], -k+m-1, -k+m+1], k]]
Nmax=3; Flatten[Table[T[n, k], {n, 1, Nmax}, {k, 1, 4 n-3}]]
CROSSREFS
Cf. A016813 (row lengths), A000384, A378684, A380245, A379343.
Sequence in context: A240827 A023841 A340553 * A245605 A269863 A297165
KEYWORD
nonn,tabf,new
AUTHOR
Boris Putievskiy, Feb 04 2025
STATUS
approved