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.

Showing 1-7 of 7 results.

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.

Original entry on oeis.org

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, 23, 29, 28, 30, 35, 32, 33, 34, 31, 36, 43, 44, 41, 42, 39, 40, 37, 38, 46, 45, 47, 54, 49, 52, 51, 50, 53, 48, 55
Offset: 1

Views

Author

Boris Putievskiy, Feb 24 2024

Keywords

Comments

Generalization of the Cantor numbering method for two adjacent diagonals. A pair of neighboring diagonals are combined into one block.
The sequence is a self-inverse permutation of natural numbers.
The sequence is an intra-block permutation of integer positive numbers.
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

Examples

			Triangle begins:
     k = 1   2   3   4   5   6   7   8   9  10  11
  n=1:   2,  1,  3;
  n=2:   4,  5,  7,  6,  8,  9, 10;
  n=3:  13, 14, 11, 12, 16, 15, 17, 20, 19, 18, 21;
Subtracting (n-1)*(2*n-1) from each term is row n is a self-inverse permutation of 1 .. 4*n-1,
  2,1,3,
  1,2,4,3,5,6,7,
  3,4,1,2,6,5,7,10,9,8,11,
  ...
The triangle rows can be arranged as two successive upward antidiagonals in an array:
   2,  3,  7, 10, 16, 21, ...
   1,  5,  9, 12, 18, 23, ...
   4,  8, 11, 19, 22, 34, ...
   6, 14, 20, 25, 33, 40, ...
  13, 17, 24, 32, 39, 51, ...
  15, 27, 35, 42, 52, 61, ...
		

Crossrefs

Programs

  • Mathematica
    Nmax = 21;
    a[n_] := Module[{L, R, P, Result}, L = Ceiling[(Sqrt[8*n + 1] - 1)/4];
      R = n - (L - 1)*(2*L - 1);
      P = If[R < 2*L - 1, If[Mod[R, 2] == 1, -R + 2*L - 2, -R + 2*L],
        If[R == 2*L - 1, 2*L,
         If[R == 2*L, R - 1, If[Mod[R, 2] == 1, R, 6*L - R]]]];
      Result = P + (L - 1)*(2*L - 1);
      Result]
    Table[a[n], {n, 1, Nmax}]

Formula

Linear sequence:
a(n) = P(n) + (L(n)-1)*(2*L(n)-1), where L(n) = ceiling((sqrt(8*n+1)-1)/4),
L(n) = A204164(n),
R(n) = n - (L(n)-1)*(2*L(n)-1),
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.
Triangular array T(n,k) for 1 <= k <= 4*n-1 (see Example):
T(n,k) = (n-1)*(2*n-1) + P(n,k), where
P(n,k) = 2*n-k-2 if k < 2*n-1 and k mod 2 = 1,
2*n-k if k < 2*n-1 and k mod 2 = 0,
2*k if k = 2*n-1,
k-1 if k = 2*n,
k if k > 2*n and k mod 2 = 1,
6*n-k if k > 2*n and k mod 2 = 0.

A373498 a(a(a(n))) = A370655(n).

Original entry on oeis.org

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, 35, 29, 28, 30, 26, 32, 24, 34, 22, 36, 38, 48, 40, 50, 42, 52, 44, 54, 46, 45, 47, 43, 49, 41, 51, 39, 53, 37, 55
Offset: 1

Views

Author

Boris Putievskiy, Jun 17 2024

Keywords

Comments

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.
Generalization of the Cantor numbering method for two adjacent diagonals. A pair of neighboring diagonals are combined into one block.
The sequence is an intra-block permutation of positive integers.
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

Examples

			Triangle begins:
     k = 1   2   3   4   5   6   7   8   9  10  11
  n=1:   2,  1,  3;
  n=2:   5,  9,  7,  6,  8,  4, 10;
  n=3:  12, 18, 14, 20, 16, 15, 17, 13, 19, 11, 21;
The triangle's rows can be arranged as two successive upward antidiagonals in an array:
   2,  3,  7, 10, 16, 21, ...
   1,  9,  4, 20, 11, 35, ...
   5,  8, 14, 19, 27, 34, ...
   6, 18, 13, 33, 24, 52, ...
  12, 17, 25, 32, 42, 51, ...
  15, 31, 26, 50, 41, 73, ...
Subtracting (n-1)*(2*n-1) from each term in row n is a permutation of 1 .. 4*n-1:
   2,1,3,
   2,6,4,3,5,1,7,
   2,8,4,10,6,5,7,3,9,1,11,
   ...
The 3rd power of each permutation is equal to the corresponding permutation in example A370655:
   (2,1,3)^3 = (2,1,3),
   (2,6,4,3,5,1,7)^3 = (1,2,4,3,5,6,7),
   (2,8,4,10,6,5,7,3,9,1,11)^3 = (3,4,1,2,6,5,7,10,9,8,11).
		

Crossrefs

Programs

  • Mathematica
    Nmax=21;
    a[n_]:=Module[{L,R,P,Result},L=Ceiling[(Sqrt[8*n+1]-1)/4];
    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];
    Result=P+(L-1)*(2*L-1);
    Result]
    Table[a[n],{n,1,Nmax}]
    Table[a[a[a[n]]],{n,1,Nmax}] (* A370655 *)

Formula

Linear sequence:
a(n) = P(n) + (L(n)-1)*(2*L(n)-1), where L(n) = ceiling((sqrt(8*n+1)-1)/4),
L(n) = A204164(n), R(n) = n - (L(n)-1)*(2*L(n)-1),
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.
Triangular array T(n,k) for 1 <= k <= 4*n-1 (see Example):
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,
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.

A374494 a(n) = A373498(A373498(n)).

Original entry on oeis.org

1, 2, 3, 9, 4, 6, 7, 8, 5, 10, 18, 13, 20, 11, 15, 16, 17, 14, 19, 12, 21, 31, 26, 33, 24, 35, 22, 28, 29, 30, 27, 32, 25, 34, 23, 36, 48, 43, 50, 41, 52, 39, 54, 37, 45, 46, 47, 44, 49, 42, 51, 40, 53, 38, 55
Offset: 1

Views

Author

Boris Putievskiy, Jul 09 2024

Keywords

Comments

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.
Generalization of the Cantor numbering method for two adjacent diagonals. A pair of neighboring diagonals are combined into one block.
The sequence is an intra-block permutation of positive integers.
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

Examples

			Triangle begins:
     k = 1   2   3   4   5   6   7   8   9  10  11
  n=1:   1,  2,  3;
  n=2:   9,  4,  6,  7,  8,  5, 10;
  n=3:  18, 13, 20, 11, 15, 16, 17, 14, 19, 12, 21;
The triangle's rows can be arranged as two successive upward antidiagonals in an array:
   1,  3,  6, 10, 15, 21, ...
   2,  4,  5, 11, 12, 22, ...
   9,  8, 20, 19, 35, 34, ...
   7, 13, 14, 24, 25, 39, ...
  18, 17, 33, 32, 52, 51, ...
  16, 26, 27, 41, 42, 60, ...
Subtracting (n-1)*(2*n-1) from each term in row n is a permutation of 1 .. 4*n-1:
   1,2,3,
   6,1,3,4,5,2,7,
   8,3,10,1,5,6,7,4,9,2,11
   ...
The 2nd power of each permutation in example A373498 is equal to the corresponding permutation above:
   (2,1,3)^2 = (1,2,3),
   (2,6,4,3,5,1,7)^2 = (6,1,3,4,5,2,7),
   (2,8,4,10,6,5,7,3,9,1,11)^2 = (8,3,10,1,5,6,7,4,9,2,11).
		

Crossrefs

Programs

  • Mathematica
    Nmax=21;
    a[n_]:=Module[{L,R,P,Result},L=Ceiling[(Sqrt[8*n+1]-1)/4];
    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];
    Result=P+(L-1)*(2*L-1);
    Result]
    Table[a[n],{n,1,Nmax}] (* A373498 *)
    Table[a[a[n]],{n,1,Nmax}] (* this sequence *)
    Nmax = 21;
    a[n_] := Module[{L, R, P, Result}, L = Ceiling[(Sqrt[8*n + 1] - 1)/4];
      R = n - (L - 1)*(2*L - 1);
      P = Which[R < 2*L - 1 && Mod[R, 2] == 1, 2*L + R + 1, R < 2*L - 1 && Mod[R, 2] == 0, 2*L - R - 1, R >= 2*L - 1 && Mod[R, 2] == 1, R, R >= 2*L - 1 && Mod[R, 2] == 0, 4*L - R];
      Result = P + (L - 1)*(2*L - 1);
      Result]
    Table[a[n], {n, 1, Nmax}]

Formula

Linear sequence:
a(n) = P(n) + (L(n)-1)*(2*L(n)-1), where L(n) = ceiling((sqrt(8*n+1)-1)/4),
L(n) = A204164(n), R(n) = n - (L(n)-1)*(2*L(n)-1), P(n) = 2*L(n) + R(n) + 1 if R(n) < 2*L(n)-1 and R(n) mod 2 = 1, P(n) = 2*L(n) - R(n) - 1 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) if R(n) >= 2*L(n)-1 and R(n) mod 2 = 0.
Triangular array T(n,k) for 1 <= k <= 4*n-1 (see Example):
T(n,k) = (n-1)*(2*n-1) + P(n,k), where P(n,k) = 2*n + k + 1 if k < 2*n-1 and k mod 2 = 1, P(n,k) = 2*n - k - 1 if k < 2*n-1 and k mod 2 = 0, P(n,k) = k if k >= 2*n-1 and k mod 2 = 1, P(n,k) = 4*n - k if k >= 2*n-1 and k mod 2 = 0.

A374531 a(n) = A374494(A374494(n)).

Original entry on oeis.org

1, 2, 3, 5, 9, 6, 7, 8, 4, 10, 14, 20, 12, 18, 15, 16, 17, 11, 19, 13, 21, 27, 35, 25, 33, 23, 31, 28, 29, 30, 22, 32, 24, 34, 26, 36, 44, 54, 42, 52, 40, 50, 38, 48, 45, 46, 47, 37, 49, 39, 51, 41, 53, 43, 55
Offset: 1

Views

Author

Boris Putievskiy, Jul 10 2024

Keywords

Comments

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.
Generalization of the Cantor numbering method for two adjacent diagonals. A pair of neighboring diagonals are combined into one block.
The sequence is an intra-block permutation of positive integers.
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

Examples

			Triangle begins:
     k = 1   2   3   4   5   6   7   8   9  10  11
  n=1:   1,  2,  3;
  n=2:   5,  9,  6,  7,  8,  4, 10;
  n=3:  14, 20, 12, 18, 15, 16, 17, 11, 19, 13, 21;
The triangle's rows can be arranged as two successive upward antidiagonals in an array:
   1,  3,  6, 10, 15, 21, ...
   2,  9,  4, 18, 13, 31, ...
   5,  8, 12, 19, 23, 34, ...
   7, 20, 11, 33, 24, 50, ...
  14, 17, 25, 32, 40, 51, ...
  16, 35, 22, 52, 39, 73, ...
Subtracting (n-1)*(2*n-1) from each term in row n is a permutation of 1 .. 4*n-1:
   1,2,3,
   2,6,3,4,5,1,7
   4,10,2,8,5,6,7,1,9,3,11
   ...
The 4th power of each permutation in example A373498 is equal to the corresponding permutation above:
   (2,1,3)^4 = (1,2,3),
   (2,6,4,3,5,1,7)^4 = (2,6,3,4,5,1,7),
   (2,8,4,10,6,5,7,3,9,1,11)^4 = (4,10,2,8,5,6,7,1,9,3,11).
		

Crossrefs

Programs

  • Mathematica
    Nmax=21;
    a[n_]:=Module[{L,R,P,Result},L=Ceiling[(Sqrt[8*n+1]-1)/4];
    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];
    Result=P+(L-1)*(2*L-1);
    Result]
    Table[a[n],{n,1,Nmax}] (* A373498(n) *)
    Table[a[a[a[a[n]]]],{n,1,Nmax}] (* this sequence *)
    Nmax=21;
    a[n_]:=Module[{L,R,P,Result},L=Ceiling[(Sqrt[8*n+1]-1)/4];
    R=n-(L-1)*(2*L-1);
    P=Which[R<2*L-1&&Mod[R,2]==1,2*L-R-1,R<2*L-1&&Mod[R,2]==0,4*L-R,R==2*L,R,R>=2*L-1&&Mod[R,2]==1,R,R>=2*L-1&&Mod[R,2]==0,-2*L+R-1];
    Result=P+(L-1)*(2*L-1);
    Result];
    Table[a[n],{n,1,Nmax}]

Formula

Linear sequence:
a(n) = P(n) + (L(n)-1)*(2*L(n)-1), where L(n) = ceiling((sqrt(8*n+1)-1)/4),
L(n) = A204164(n), R(n) = n - (L(n)-1)*(2*L(n)-1), P(n) = 2*L(n) - R(n) - 1, if R(n) < 2*L(n) - 1 and R(n) mod 2 = 1, P(n) = 4*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), P(n) = R(n), if R(n) >= 2*L(n) - 1 and R(n) mod 2 = 1, P(n) = - 2*L(n) + R(n) - 1, if R(n) >= 2*L(n) - 1 and R(n) mod 2 = 0.
a(n) = A373498(A373498(A373498(A373498(n)))). Boris Putievskiy, Aug 02 2024
Triangular array T(n,k) for 1 <= k <= 4*n-1 (see Example):
T(n,k) = (n-1)*(2*n-1) + P(n,k), where P(n,k) = 2n - k - 1, if k < 2*n-1 and k mod 2 = 1, P(n,k) = 4n - k, if k < 2*n-1 and k mod 2 = 0, P(n,k) = k, if k = 2*n, P(n,k) = k, if k >= 2*n and k mod 2 = 1, P(n,k) = - 2n + k - 1, if k >= 2*n and k mod 2 = 0.

A378200 Square array read by upward antidiagonals: T(n,k) = ((k + n - 1)^2 + (k - n + 1)*(-1)^n + (1 - k - n)*(-1)^k + (1 - k - n)*(-1)^(k + n) + 2)/2.

Original entry on oeis.org

1, 5, 2, 6, 3, 4, 12, 9, 14, 7, 15, 8, 13, 10, 11, 23, 20, 25, 18, 27, 16, 28, 17, 26, 19, 24, 21, 22, 38, 35, 40, 33, 42, 31, 44, 29, 45, 30, 43, 32, 41, 34, 39, 36, 37, 57, 54, 59, 52, 61, 50, 63, 48, 65, 46, 66, 47, 64, 49, 62, 51, 60, 53, 58, 55, 56
Offset: 1

Views

Author

Boris Putievskiy, Nov 19 2024

Keywords

Comments

The sequence can be arranged in a triangular 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. Row n has a length of 4n-3 = A016813(n-1), n > 0. For n > 1, each row is a pair consecutive antidiagonals.
The sequence is an intra-block permutation of the positive integers.
Generalization of Cantor numbering method.
This sequence generates the cyclic group C6 under composition. The elements of C6 are the successive compositions of this sequence with itself: A378684(n) = a(a(n)) = a^2(n), A378762(n) = a^3(n), A379342(n) = a^4(n), A378705(n) = a^5(n). The identity element is A000027(n) = a^6(n). - Boris Putievskiy, Jan 03 2025
A379343 and A378684 generate via composition a finite non-abelian group of permutations of positive integers, isomorphic to the alternating group A4. The list of the 12 elements of that group: this sequence, A379343 (the inverse permutation), A000027 (the identity permutation), A381662, A380817, A376214, A378684, A379342, A380245, A381664, A380815, A381663. For subgroups and the Cayley table of the group A4 see Boris Putievskiy (2025) link. - Boris Putievskiy, Mar 28 2025

Examples

			Table begins:
   1,  2,  4,  7, 11, ...
   5,  3, 14, 10, 27, ...
   6,  9, 13, 18, 24, ...
  12,  8, 25, 19, 42, ...
  15, 20, 26, 33, 41, ...
  ...
The first 5 antidiagonals are:
   1;
   5, 2;
   6, 3,  4;
  12, 9, 14,  7;
  15, 8, 13, 10, 11;
Triangle array begins:
  k=   1   2   3   4   5   6   7   8   9
  n=1: 1;
  n=2: 5,  2,  6,  3,  4;
  n=3: 12, 9, 14,  7,  15, 8, 13, 10, 11;
Subtracting (n-1)*(2*n-3) from each term is row n produces a permutation of numbers from 1 to 4*n-3:
  1;
  4, 1, 5, 2, 3;
  6, 3, 8, 1, 9, 2, 7, 4, 5.
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] := ((k + n - 1)^2 + (k - n + 1)*(-1)^n + (1 - k - n)*(-1)^k + (1 - k - n)*(-1)^(k + n) + 2)/2;
    Table[T[k, n], {k, 1, 5}, {n, 1, 5}]

Formula

Triangular array T(n,k) for 1 <= k <= 4n - 3 (see Example): T(n,k) = A000384(n-1) + P(n,k), P(n,k) = m + k if k < m and k == 1 (mod 2), P(n,k) = m - k if k < m and k == 0 (mod 2), P(n,k) = 3m - k - 1 if k >= m and k == 1 (mod 2), P(n,k)= - m + k + 1 if k >= m and k == 0 (mod 2), where m = 2n - 1.
G.f.: x*y*(1 + y + y^3 + y^4 - x^3*(2 + y + y^2 - 5*y^3 + y^4) + x*(4 - 3*y + y^2 - y^3 - y^4) - x^2*(1 - 3*y + 9*y^2 + 3*y^3 - 2*y^4) + x^4*(2 + y^2 - 2*y^3 + 3*y^4))/((1 - x)^3*(1 + x)^2*(1 - y)^3*(1 + y)^2). - Stefano Spezia, Jan 12 2025

A378705 Inverse permutation to A378200.

Original entry on oeis.org

1, 3, 5, 6, 2, 4, 10, 12, 8, 14, 15, 7, 13, 9, 11, 21, 23, 19, 25, 17, 27, 28, 16, 26, 18, 24, 20, 22, 36, 38, 34, 40, 32, 42, 30, 44, 45, 29, 43, 31, 41, 33, 39, 35, 37, 55, 57, 53, 59, 51, 61, 49, 63, 47, 65, 66, 46, 64, 48, 62, 50, 60, 52, 58, 54, 56
Offset: 1

Views

Author

Boris Putievskiy, Dec 05 2024

Keywords

Comments

The sequence can be arranged in a triangular array, read by rows. Each row is a permutation of a block of consecutive numbers; the blocks are disjoint and every positive number belongs to some block. The length of row n is 4n-3 = A016813(n-1), n > 0.
The sequence can be represented as a table read by upward antidiagonals. For n>1 row n joins two consecutive antidiagonals.
The sequence is an intra-block permutation of the positive integers.
Generalization of Cantor numbering method.
The sequence A378200 generates the cyclic group C6 under composition. The elements of C6 are the successive compositions of A378200 with itself: A378684(n) = A378200(A378200(n)) = A378200(n)^2, A378762(n) = A378200(n)^3, A379342(n) = A378200(n)^4, A378705(n) = A378200(n)^5. The identity element is A000027(n) = A378200(n)^6. - Boris Putievskiy, Jan 12 2025

Examples

			Triangle array begins:
  k=    1   2   3   4   5   6   7   8   9
  n=1:  1;
  n=2:  3,  5,  6,  2,  4;
  n=3: 10, 12,  8, 14, 15,  7, 13,  9, 11;
(1, 3, 5, ..., 9, 11) = (A378200(1), A378200(2), A378200(3), ..., A378200(14), A378200(15))^(-1).
For n > 1, each row of triangle array joins two consecutive upward antidiagonals in the table:
   1,  5,  4, 14, 11, ...
   3,  2,  8,  9, 17, ...
   6, 12, 13, 25, 24, ...
  10,  7, 19, 18, 32, ...
  15, 23, 26, 40, 41, ...
  ...
Subtracting (n-1)*(2*n-3) from each term in row n produces a permutation of numbers from 1 to 4*n-3:
  1;
  2, 4, 5, 1, 3;
  4, 6, 2, 8, 9, 1, 7, 3, 5.
		

Crossrefs

Programs

  • Mathematica
    P[n_,k_]:=Module[{m=2*n-1},If[k
    				

Formula

Linear sequence: (a(1), a(2), ..., a(A000384(n+1))) is permutation of the positive integers from 1 to A000384(n+1). (a(1), a(2), ..., a(A000384(n+1))) = (A378200(1), A378200(2), ..., A378200(A000384(n+1)))^(-1).
Triangular array T(n,k) for 1 <= k <= 4n - 3 (see Example): T(n,k) = A000384(n-1) + P(n,k), P(n,k) = m - k if k < m and k == 1 (mod 2), P(n,k) = m + k - 1 if k < m and k == 0 (mod 2), P(n,k) = 3m - k - 1 if k >= m and k == 1 (mod 2), P(n,k) = - m + k if k >= m and k == 0 (mod 2), where m = 2n - 1.

A378198 Table T(n, k) read by upward antidiagonals. T(n,1) = A375602(n), T(n,2) = A375602(A375602(n)), T(n,3) = A375602(A375602(A375602(n))) and so on.

Original entry on oeis.org

1, 2, 1, 4, 2, 1, 3, 3, 2, 1, 5, 4, 4, 2, 1, 6, 5, 3, 3, 2, 1, 7, 6, 5, 4, 4, 2, 1, 10, 7, 6, 5, 3, 3, 2, 1, 13, 16, 7, 6, 5, 4, 4, 2, 1, 16, 14, 9, 7, 6, 5, 3, 3, 2, 1, 8, 9, 17, 13, 7, 6, 5, 4, 4, 2, 1, 11, 10, 13, 12, 14, 7, 6, 5, 3, 3, 2, 1, 14, 8, 16, 14, 11, 17, 7, 6, 5, 4, 4, 2, 1, 17, 17, 10, 9, 17, 8, 12, 7, 6, 5, 3, 3, 2, 1, 19, 12, 12, 16, 13, 12, 10, 11, 7
Offset: 1

Views

Author

Boris Putievskiy, Nov 19 2024

Keywords

Comments

Sequence A375602 generates an infinite cyclic group under composition. The identity element is A000027.
Each column is triangle 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. Row n has length n(n^2 + 1)/2 = A006003(n).
Each column is an intra-block permutation of the positive integers.
For n > 1, each row combines n consecutive antidiagonals.
Generalization of the Cantor numbering method.

Examples

			Table begins:
  k =      1   2   3   4   5   6
--------------------------------------
  n =  1:  1,  1,  1,  1,  1,  1, ...
  n =  2:  2,  2,  2,  2,  2,  2, ...
  n =  3:  4,  3,  4,  3,  4,  3, ...
  n =  4:  3,  4,  3,  4,  3,  4, ...
  n =  5:  5,  5,  5,  5,  5,  5, ...
  n =  6:  6,  6,  6,  6,  6,  6, ...
  n =  7:  7,  7,  7,  7,  7,  7, ...
  n =  8: 10, 16,  9, 13, 14, 17, ...
  n =  9: 13, 14, 17, 12, 11,  8, ...
  n = 10: 16,  9, 13, 14, 17, 12, ...
    ...
Column k = 1 contains the start of A375602.
Ord(T(1,1),T(2,1), ... T(7,1)) = 2, ord(T(1,1),T(2,1), ... T(21,1)) = 18, ord(T(1,1),T(2,1), ... T(55,1)) = 1980, ord(T(1,1),T(2,1), ... T(120,1)) = 51480, where ord is order of permutation.
The first 6 antidiagonals are:
  1;
  2, 1;
  4, 2, 1;
  3, 3, 2, 1;
  5, 4, 4, 2, 1;
  6, 5, 3, 3, 2, 1;
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Module[{L,Ld,Rd,P,Result},L=Ceiling[(Sqrt[4*Sqrt[8*n+1]-3]-1)/2]; Ld=Ceiling[(Sqrt[8*n+1]-1)/2]; Rd=n-(Ld-1)*Ld/2; P=L*Rd+Ld-L*(L+1)/2-Max[Rd-(L^2-L+2)/2,0]*(Max[Rd-(L^2-L+2)/2,0]+1)/2; Result=P+(L-1)*L*(L^2-L+2)/8; Result] (*A375602*) composeSequence[a_,n_,k_]:=Nest[a,n,k]
    Nmax=10; Kmax=6; T=Table[composeSequence[a,n,k],{n,1,Nmax},{k,1,Kmax}]

Formula

(T(1,k),T(2,k), ... T(A002817(n),k)) is permutation of the integers from 1 to A002817(n). (T(1,k),T(2,k), ... T(A002817(n),k)) = (T(1,1),T(2,1), ... T(A002817(n),1))^k.
Showing 1-7 of 7 results.