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 A373498 #24 Aug 03 2024 11:10:11 %S A373498 2,1,3,5,9,7,6,8,4,10,12,18,14,20,16,15,17,13,19,11,21,23,31,25,33,27, %T A373498 35,29,28,30,26,32,24,34,22,36,38,48,40,50,42,52,44,54,46,45,47,43,49, %U A373498 41,51,39,53,37,55 %N A373498 a(a(a(n))) = A370655(n). %C A373498 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 A373498 Generalization of the Cantor numbering method for two adjacent diagonals. A pair of neighboring diagonals are combined into one block. %C A373498 The sequence is an intra-block permutation of positive integers. %C A373498 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 02 2024 %H A373498 Boris Putievskiy, <a href="/A373498/b373498.txt">Table of n, a(n) for n = 1..9870</a> _Boris Putievskiy_, Aug 02 2024 %H A373498 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 A373498 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %H A373498 _Boris Putievskiy_, Aug 02 2024 %F A373498 Linear sequence: %F A373498 a(n) = P(n) + (L(n)-1)*(2*L(n)-1), where L(n) = ceiling((sqrt(8*n+1)-1)/4), %F A373498 L(n) = A204164(n), R(n) = n - (L(n)-1)*(2*L(n)-1), %F A373498 P(n) = R(n) + 1 if R(n) <= 2*L(n)-1 and R(n) mod 2 = 1, P(n) = 2*L(n) + R(n) if R(n) <= 2*L(n)-1 and R(n) mod 2 = 0, P(n) = R(n) if R(n) > 2*L(n)-1 and R(n) mod 2 = 1, P(n) = 4*L(n) - R(n) - 1 if R(n) > 2*L(n)-1 and R(n) mod 2 = 0. %F A373498 Triangular array T(n,k) for 1 <= k <= 4*n-1 (see Example): %F A373498 T(n,k) = (n-1)*(2*n-1) + P(n,k), where P(n,k) = k + 1 if k <= 2*n-1 and k mod 2 = 1, P(n,k) = 2*n + k if k <= 2*n-1 and k mod 2 = 0, %F A373498 P(n,k) = k if k > 2*n-1 and k mod 2 = 1, P(n,k) = 4*n - k - 1 if k > 2*n-1 and k mod 2 = 0. %e A373498 Triangle begins: %e A373498 k = 1 2 3 4 5 6 7 8 9 10 11 %e A373498 n=1: 2, 1, 3; %e A373498 n=2: 5, 9, 7, 6, 8, 4, 10; %e A373498 n=3: 12, 18, 14, 20, 16, 15, 17, 13, 19, 11, 21; %e A373498 The triangle's rows can be arranged as two successive upward antidiagonals in an array: %e A373498 2, 3, 7, 10, 16, 21, ... %e A373498 1, 9, 4, 20, 11, 35, ... %e A373498 5, 8, 14, 19, 27, 34, ... %e A373498 6, 18, 13, 33, 24, 52, ... %e A373498 12, 17, 25, 32, 42, 51, ... %e A373498 15, 31, 26, 50, 41, 73, ... %e A373498 Subtracting (n-1)*(2*n-1) from each term in row n is a permutation of 1 .. 4*n-1: %e A373498 2,1,3, %e A373498 2,6,4,3,5,1,7, %e A373498 2,8,4,10,6,5,7,3,9,1,11, %e A373498 ... %e A373498 The 3rd power of each permutation is equal to the corresponding permutation in example A370655: %e A373498 (2,1,3)^3 = (2,1,3), %e A373498 (2,6,4,3,5,1,7)^3 = (1,2,4,3,5,6,7), %e A373498 (2,8,4,10,6,5,7,3,9,1,11)^3 = (3,4,1,2,6,5,7,10,9,8,11). %t A373498 Nmax=21; %t A373498 a[n_]:=Module[{L,R,P,Result},L=Ceiling[(Sqrt[8*n+1]-1)/4]; %t A373498 R=n-(L-1)*(2*L-1); %t A373498 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 A373498 Result=P+(L-1)*(2*L-1); %t A373498 Result] %t A373498 Table[a[n],{n,1,Nmax}] %t A373498 Table[a[a[a[n]]],{n,1,Nmax}] (* A370655 *) %Y A373498 Cf. A000027, A004767 (row lengths), A204164, A370655, A374447, A374494, A374531. %K A373498 nonn,tabf %O A373498 1,1 %A A373498 _Boris Putievskiy_, Jun 17 2024