This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A383589 #11 May 06 2025 11:24:05 %S A383589 1,2,3,6,5,4,7,10,9,8,15,12,13,14,11,16,21,18,19,20,17,28,23,26,25,24, %T A383589 27,22,29,36,31,34,33,32,35,30,45,38,43,40,41,42,39,44,37,46,55,48,53, %U A383589 50,51,52,49,54,47,66,57,64,59,62,61,60,63,58,65,56 %N A383589 a(n) = A378762(A381662(n)). %C A383589 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. %C A383589 The sequence can also be regarded as a table read by upward antidiagonals. For n > 1 row n joins two consecutive antidiagonals. %C A383589 The sequence is a self-inverse permutation of the positive integers. %C A383589 In particular, the initial {a(1), a(2), ..., a(A000384(n+1))} is self-inverse. %C A383589 The sequence is an intra-block permutation of the positive integers. %C A383589 Generalization of the Cantor numbering method. %H A383589 Boris Putievskiy, <a href="/A383589/b383589.txt">Table of n, a(n) for n = 1..9730</a> %H A383589 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 A383589 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>. %F A383589 T(n,k) for 1 <= k <= 4n - 3: T(n,k) = A000384(n-1) + P(n,k), P(n, k) = k if k < m and k == 1 (mod 2), P(n, k) = m + 1 - k if k < m and k == 0 (mod 2), P(n, k) = 3m - 1 - k if k >= m and k == 1 (mod 2), P(n, k) = k if k >= m and k == 0 (mod 2), where m = 2n - 1. %e A383589 Triangle array begins: %e A383589 k= 1 2 3 4 5 6 7 8 9 %e A383589 n=1: 1; %e A383589 n=2: 2, 3, 6, 5, 4; %e A383589 n=3: 7, 10, 9, 8, 15, 12, 13, 14, 11; %e A383589 (1, 2, 3, ..., 14, 11) = (1, 2, 3, ..., 12, 11) (1, 2, 3, ..., 12, 15). The first permutation on the right-hand side is from Example A378762 and the second from Example A381662. %e A383589 (1, 2, 3, ..., 14, 11) = (1, 2, 3, ..., 14, 11)^(-1). %e A383589 For n > 1, each row of triangle array joins two consecutive upward antidiagonals in the table: %e A383589 1, 3, 4, 8, 11, ... %e A383589 2, 5, 9, 14, 20, ... %e A383589 6, 10, 13, 19, 24, ... %e A383589 7, 12, 18, 25, 33, ... %e A383589 15, 21, 26, 34, 41, ... %e A383589 ... %e A383589 Subtracting (n-1)*(2*n-3) from each term in row n produces a permutation of numbers from 1 to 4*n-3: %e A383589 1; %e A383589 1, 2, 5, 4, 3; %e A383589 1, 4, 3, 2, 9, 6, 7, 8, 5. %t A383589 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],3m-1-k,k]]] %t A383589 Nmax=3; Flatten[Table[T[n,k],{n,1,Nmax},{k,1,4*n-3}]] %Y A383589 Cf. A000027, A000384, A016813 (row lengths), A376214, A378684, A379342, A379343, A380200, A380245, A380815, A380817, A381662, A381663, A381664, A381968, A382499, A382679, A382680. %K A383589 nonn,tabf %O A383589 1,2 %A A383589 _Boris Putievskiy_, May 01 2025