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 A375725 #14 Apr 26 2025 20:08:28 %S A375725 1,3,1,2,2,6,4,3,2,10,5,4,4,2,1,6,9,3,8,14,1,10,6,5,4,3,20,28,8,7,1,6, %T A375725 12,3,2,36,9,8,7,5,5,18,26,2,1,7,5,20,7,10,5,4,34,44,1 %N A375725 Table T(n, k) read by upward antidiagonals. The sequences in each column k is a triangle read by rows, where each row is a permutation of the numbers of its constituents; see Comments. %C A375725 Generalization of the Cantor numbering method for k (k > 1) adjacent diagonals. In this approach, column number k combines k neighboring diagonals. Block number n in column k has length k^2*n - k*(k-1)/2 = A360665(n,k) for n, k > 0. %C A375725 A208234 presents an algorithm for generating permutations, where each generated permutation is self-inverse. %C A375725 The sequence in each column k possesses two properties: it is both a self-inverse permutation and an intra-block permutation of natural numbers. %H A375725 Boris Putievskiy, <a href="/A375725/b375725.txt">Table of n, a(n) for n = 1..9870</a> %H A375725 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 A375725 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>. %F A375725 T(n,k) = P(n,k) + k*(L(n,k) - 1)*(k*(L(n,k) - 1) + 1)/2 = P(n,k) + A342719(L(n,k) - 1,k)), where L(n,k) = ceiling((sqrt(8*n+1)-1)/(2*k)), R(n,k) = n - k*(L(n,k)-1)*(k*(L(n,k)-1)+1)/2, P(n,k) = - max(R(n,k) , k^2*L(n,k) - k(k-1)/2 + 1 - R(n,k) ) * ((-1)^R(n,k) - 1) / 2 + min(R(n,k) , k^2*L(n,k) - k(k-1)/2 + 1 - R(n,k) ) * ((-1)^R(n,k) + 1) / 2 if 2R(n,k) ≥k^2*L - k(k-1)/2 + 1, P(n,k) = max(R(n,k) , k^2*L(n,k) - k(k-1)/2 + 1 - R(n,k) ) * ((-1)^(k^2*L(n,k) - k(k-1)/2 + 1 - R) + 1) / 2 - min(R, k^2*L(n,k) - k(k-1)/2 + 1 - R) * ((-1)^(k^2*L(n,k) - k(k-1)/2 + 1 - R(n,k) ) - 1) / 2 if 2R < k^2*L(n,k) - k(k-1)/2. + 1. %e A375725 Table begins: %e A375725 k= 1 2 3 4 5 6 %e A375725 ------------------------------------ %e A375725 n= 1: 1, 1, 6, 10, 1, 1, ... %e A375725 n= 2: 3, 2, 2, 2, 14, 20, ... %e A375725 n= 3: 2, 3, 4, 8, 3, 3, ... %e A375725 n= 4: 4, 4, 3, 4, 12, 18, ... %e A375725 n= 5: 5, 9, 5, 6, 5, 5, ... %e A375725 n= 6: 6, 6, 1, 5, 10, 16, ... %e A375725 n= 7: 10, 7, 7, 7, 7, 7, ... %e A375725 n= 8: 8, 8, 20, 3, 8, 14, ... %e A375725 n= 9: 9, 5, 9, 9, 9, 9, ... %e A375725 n=10: 7, 10, 18, 1, 6, 12, ... %e A375725 n=11: 11, 11, 11, 36, 11, 11, ... %e A375725 n=12: 14, 20, 16, 12, 4, 10, ... %e A375725 n=13: 13, 13, 13, 34, 13, 13, ... %e A375725 n=14: 12, 18, 14, 14, 2, 8, ... %e A375725 n=15: 15, 15, 15, 32, 15, 15, ... %e A375725 n=16: 21, 16, 12, 16, 55, 6, ... %e A375725 n=17: 17, 17, 17, 30, 17, 17, ... %e A375725 n=18: 19, 14, 10, 18, 53, 4, ... %e A375725 n=19: 18, 19, 19, 28, 19, 19, ... %e A375725 n=20: 20, 12, 8, 20, 51, 2, ... %e A375725 n=21: 16, 21, 21, 26, 21, 21, ... %e A375725 ... . %e A375725 In column 2, the first 3 blocks have lengths 3,7 and 11. In column 3, the first 2 blocks have lengths 6 and 15. In column 6, the first block has a length of 21. %e A375725 Each block is a permutation of the numbers of its constituents. %e A375725 The first 6 antidiagonals are: %e A375725 1; %e A375725 3, 1; %e A375725 2, 2, 6; %e A375725 4, 3, 2, 10; %e A375725 5, 4, 4, 2, 1; %e A375725 6, 9, 3, 8, 14, 1; %t A375725 T[n_,k_]:=Module[{L,R,P,result},L=Ceiling[(Sqrt[8*n+1]-1)/(2*k)]; R=n-k*(L-1)*(k(L-1)+1)/2; If[2*R>=k^2*L-k*(k-1)/2+1,P=-Max[R,k^2*L-k*(k-1)/2+1-R]*((-1)^R-1)/2+Min[R,k^2*L-k*(k-1)/2+1-R]*((-1)^R+1)/2,P=Max[R,k^2*L-k*(k-1)/2+1-R]*((-1)^(k^2*L-k*(k-1)/2+1-R)+1)/2-Min[R,k^2*L-k*(k-1)/2+1-R]*((-1)^(k^2*L-k*(k-1)/2+1-R)-1)/2]; result=P+k*(L-1)*(k*(L-1)+1)/2] %t A375725 Nmax=21; Table[T[n,k],{n,1,Nmax},{k,1,Nmax}] %Y A375725 Cf. A208234, A342719, A360665. %K A375725 nonn,tabl %O A375725 1,2 %A A375725 _Boris Putievskiy_, Aug 25 2024