login
Inverse permutation to A373498.
5

%I #17 Aug 04 2024 13:35:05

%S 2,1,3,9,4,7,6,8,5,10,20,11,18,13,16,15,17,12,19,14,21,35,22,33,24,31,

%T 26,29,28,30,23,32,25,34,27,36,54,37,52,39,50,41,48,43,46,45,47,38,49,

%U 40,51,42,53,44,55

%N Inverse permutation to A373498.

%C Triangle read by rows where row n is a block of length 4*n-1 which is a permutation of the numbers of its constituents.

%C Generalization of the Cantor numbering method for two adjacent diagonals. A pair of neighboring diagonals are combined into one block.

%C The sequence is an intra-block permutation of positive integers.

%C The sequence A373498 generates the cyclic group C6 under composition. The elements of C6 are the successive compositions of A373498 with itself: A374494 = A373498(A373498) = A373498^2, A370655 = A373498^3, A374531 = A373498^4, A374447 = A373498^5. The identity element is A000027 = A373498^6. - _Boris Putievskiy_, Aug 03 2024

%H Boris Putievskiy, <a href="/A374447/b374447.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 Linear sequence:

%F a(n) = P(n) + (L(n)-1)*(2*L(n)-1), where L(n) = ceiling((sqrt(8*n+1)-1)/4),

%F L(n) = A204164(n), P(n) = 4*L(n) - R(n) - 1, if R(n) <= 2*L(n) and R(n) mod 2 = 1, P(n) = R(n) - 1, if R(n) <= 2*L(n) and R(n) mod 2 = 0, P(n) = R(n), if R(n) > 2*L(n) and R(n) mod 2 = 1, P(n) = - 2*L(n) + R(n), if R(n) > 2*L(n) and R(n) mod 2 = 0.

%F a(n) = A373498(A373498(A373498(A373498(A373498(n))))).

%F Triangular array T(n,k) for 1 <= k <= 4*n-1 (see Example):

%F T(n,k) = (n-1)*(2*n-1) + P(n,k), where P(n,k) = 4*n - k - 1, if k <= 2*n and k mod 2 = 1, P(n,k) = k-1, if k <= 2*n and k mod 2 = 0, P(n,k) = k, if k > 2*n and k mod 2 = 1, P(n,k) = -2*n + k, if k > 2*n and k mod 2 = 0.

%e Triangle begins:

%e k = 1 2 3 4 5 6 7 8 9 10 11

%e n=1: 2, 1, 3;

%e n=2: 9, 4, 7, 6, 8, 5, 10;

%e n=3: 20, 11, 18, 13, 16, 15, 17, 12, 19, 14, 21;

%e The triangle's rows can be arranged as two successive upward antidiagonals in an array:

%e 2, 3, 7, 10, 16, 21, ...

%e 1, 4, 5, 13, 14, 26, ...

%e 9, 8, 18, 19, 31, 34, ...

%e 6, 11, 12, 24, 25, 41, ...

%e 20, 17, 33, 32, 50, 51, ...

%e 15, 22, 23, 39, 40. 60, ...

%e Subtracting (n-1)*(2*n-1) from each term in row n is a permutation of 1 .. 4*n-1:

%e 2,1,3,

%e 6,1,4,3,5,2,7,

%e 10,1,8,3,6,5,7,2,9,4,11

%e ...

%e The inverse permutation of each permutation in example A373498 is equal to the corresponding permutation above:

%e (2,1,3)^(-1) = (2,1,3),

%e (2,6,4,3,5,1,7)^(-1) = (6,1,4,3,5,2,7),

%e (2,8,4,10,6,5,7,3,9,1,11)^(-1) = (10,1,8,3,6,5,7,2,9,4,11).

%e The 5th power of each permutation in example A373498 is equal to the corresponding permutation above:

%e (2,1,3)^5 = (2,1,3),

%e (2,6,4,3,5,1,7)^5 = (6,1,4,3,5,2,7),

%e (2,8,4,10,6,5,7,3,9,1,11)^5 = (10,1,8,3,6,5,7,2,9,4,11).

%t Nmax=21;

%t a[n_]:=Module[{L,R,P,Result},L=Ceiling[(Sqrt[8*n+1]-1)/4];

%t R=n-(L-1)*(2*L-1); P=Which[R<=2*L&&Mod[R,2]==1,4*L-R-1,R<=2*L&&Mod[R,2]==0,R-1,R>2*L&&Mod[R,2]==1,R,R>2*L&&Mod[R,2]==0,-2*L+R];

%t Result=P+(L-1)*(2*L-1);

%t Result]

%t Table[a[n],{n,1,Nmax}]

%t Nmax=21;

%t a[n_]:=Module[{L,R,P,Result},L=Ceiling[(Sqrt[8*n+1]-1)/4];

%t R=n-(L-1)*(2*L-1); P=Which[R<=2*L-1&&Mod[R,2]==1,R+1,R<=2*L-1&&Mod[R,2]==0,R+2*L,R>2*L-1&&Mod[R,2]==1,R,R>2*L-1&&Mod[R,2]==0,4*L-1-R];

%t Result=P+(L-1)*(2*L-1);

%t Result]

%t Table[a[n],{n,1,Nmax}] (* A373498 *)

%t Table[a[a[a[a[a[n]]]]],{n,1,Nmax}] (* this sequence *)

%Y Cf. A000027, A004767 (row lengths), A204164, A370655, A373498, A374494, A374531.

%K nonn,tabf

%O 1,1

%A _Boris Putievskiy_, Jul 08 2024