cp's OEIS Frontend

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.

A370655 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.

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