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 A378127 #9 Dec 01 2024 14:39:32 %S A378127 1,3,4,2,6,5,10,9,11,8,12,7,14,15,13,20,21,19,22,18,23,17,24,16,27,26, %T A378127 28,25,35,34,36,33,37,32,38,31,39,30,40,29,43,44,42,45,41,53,54,52,55, %U A378127 51,56,50,57,49,58,48,59,47,60,46,64,63,65,62,66,61,76,75,77,74,78,73,79,72,80,71,81,70,82,69,83,68,84,67,88,89,87,90,86,91 %N A378127 Inverse permutation to A377137. %C A378127 Array read by rows (blocks). Each row is a permutation of a block of consecutive numbers; the blocks are disjoint and every positive number belongs to some block. %C A378127 Row n has length A064455(n). The sequence A064455 is non-monotonic. %C A378127 Subtracting (n^2 - n)/2 if n is even from each term in row n produces a permutation of 1 .. 3n/2. Subtracting (n^2 - 1)/2 if n is odd from each term in row n produces a permutation of 1 .. (n+1)/2. %C A378127 These permutations are inverses of the corresponding permutations from A377137. The algorithm used to generate them is described in A209278. %C A378127 The sequence is an intra-block permutation of the positive integers. %H A378127 Boris Putievskiy, <a href="/A378127/b378127.txt">Table of n, a(n) for n = 1..9940</a> %H A378127 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 A378127 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>. %F A378127 Array T(n,k) (see Example): %F A378127 T(n, k) = P(n, k) + A265225(n-1), where %F A378127 P(n, k) = (b(n) - k + 2)/2 if mod(b(n) - k, 2) = 0, %F A378127 P(n, k) = (b(n) + k + 1)/2 if mod(b(n) - k, 2) = 1. %F A378127 b(n) = (4n + 1 + (2n - 1) * (-1)^n)/4 is the length of the row n. %e A378127 Array begins: %e A378127 k = 1 2 3 4 5 6 %e A378127 n=1: 1; %e A378127 n=2: 3, 4, 2; %e A378127 n=3: 6, 5; %e A378127 n=4: 10, 9, 11, 8, 12, 7; %e A378127 The triangular arrays alternate by row: n=1 and n=3 comprise one, and n=2 and n=4 comprise the other. Subtracting 1, 4, and 6 from the elements of rows 2, 3, and 4, respectively, produces permutations: %e A378127 1; %e A378127 2, 3, 1; %e A378127 2, 1; %e A378127 4, 3, 5, 2, 6, 1; %e A378127 ... %e A378127 These permutations are the inverses of those in Example A377137, listed in the same order. %e A378127 (2,3,1)^(-1) = (3,1,2); (2,1)^(-1) = (2,1); (4,3,5,2,6,1)^(-1) = (6,4,2,1,3,5). %t A378127 b[n_]:=(4n+1+(2n-1)*(-1)^n)/4;P[n_,k_]:=If[EvenQ[b[n]-k],(b[n]-k+2)/2,(b[n]+k+1)/2];Res[n_,k_]:=P[n,k]+(-(-1)^n*n+(-1)^n+2 n^2-n-1)/4; %t A378127 Nmax=4;resultTable=Table[Res[n,k],{n,1,Nmax},{k,1,b[n]}]//Flatten %Y A378127 Cf. A064455, A209278, A265225, A377137. %K A378127 nonn,tabf %O A378127 1,2 %A A378127 _Boris Putievskiy_, Nov 17 2024