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-6 of 6 results.

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.

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.

A376180 Triangle read by rows (blocks). Each row consists of a permutation of the numbers of its constituents. The length of row number n is the n-th pentagonal number n(3n-1)/2 = A000326(n); see Comments.

Original entry on oeis.org

1, 4, 5, 3, 6, 2, 13, 12, 14, 11, 15, 10, 16, 9, 17, 8, 18, 7, 30, 29, 31, 28, 32, 27, 33, 26, 34, 25, 35, 24, 36, 23, 37, 22, 38, 21, 39, 20, 40, 19, 58, 59, 57, 60, 56, 61, 55, 62, 54, 63, 53, 64, 52, 65, 51, 66, 50, 67, 49, 68, 48, 69, 47, 70, 46, 71, 45, 72, 44, 73, 43, 74, 42, 75, 41, 101, 102, 100, 103, 99, 104, 98, 105, 97, 106, 96, 107
Offset: 1

Views

Author

Boris Putievskiy, Sep 14 2024

Keywords

Comments

A209278 presents an algorithm for generating permutations.
The sequence is an intra-block permutation of integer positive numbers.

Examples

			Triangle begins:
     k =  1   2   3   4   5   6   7   8   9  10  11  12
  n=1:    1;
  n=2:    4,  5,  3,  6,  2;
  n=3:   13, 12, 14, 11, 15, 10, 16,  9, 17,  8, 18,  7;
Subtracting (n-1)^2*n/2 from each term in row n is a permutation of 1 .. n(3n-1)/2:
  1;
  3,4,2,5,1;
  7,6,8,5,9,4,10,3,11,2,12,1;
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Module[{L,R,P,Result},L=Ceiling[Max[x/.NSolve[x^2 (x+1)-2 n==0,x,Reals]]];
    R=n-((L-1)^2)*L/2; P=Which[OddQ[R]&&OddQ[L*(3*L-1)/2],(L*(3*L-1)/2-R+2)/2,OddQ[R]&&EvenQ[L*(3*L-1)/2],(R+L*(3*L-1)/2+1)/2,EvenQ[R]&&OddQ[L*(3*L-1)/2],Ceiling[(L*(3*L-1)/2+1)/2]+R/2, EvenQ[R]&&EvenQ[L*(3*L-1)/2],Ceiling[(L*(3*L-1)/2+1)/2]-R/2 ];
    Result=P+(L-1)^2*L/2; Result]
    Nmax=18; Table[a[n],{n,1,Nmax}]

Formula

Linear sequence:
a(n) = P(n) + (L(n)-1)^2*L(n)/2. a(n) = P(n) + A002411(L(n)-1), where P = (L(n)(3L(n) - 1)/2 - R(n) + 2)/2 if R(n) is odd and L(n)(3L(n) - 1)/2 is odd, P = (R(n) + L(n)(3L(n) - 1)/2 + 1)/2 if R(n) is odd and L(n)(3L(n) - 1)/2 is even, P = ceiling((L(n)(3L(n) - 1)/2 + 1)/2) + R(n)/2 if R(n) is even and L(n)(3L(n) - 1)/2 is odd, P = ceiling((L(n)(3L(n) - 1)/2 + 1)/2) - R(n)/2 if R(n) is even and L(n)(3L(n) - 1)/2 is even. L(n) = ceiling(x(n)), x(n) is largest real root of the equation x^2*(x+1)-2*n = 0.
Triangular array T(n,k) for 1 <= k <= n(3n-1)/2 (see Example):
T(n,k) = P(n,k) + (n-1)^2*n/2, T(n,k) = P(n,k) + A002411(n-1), where P(n,k) = (n(3n - 1)/2 - k + 2)/2 if k is odd and n(3n - 1)/2 is odd,
P(n,k) = (k + n(3n - 1)/2 + 1)/2 if k is odd and n(3n - 1)/2 is even, P(n,k) = ceiling((n(3n - 1)/2 + 1)/2) + k/2 if k is even and n(3n - 1)/2 is odd, P(n,k) = ceiling((n(3n - 1)/2 + 1)/2) - k/2 if k is even and n(3n - 1)/2 is even.

A377137 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 contains 3n/2 elements if n is even, and (n+1)/2 elements if n is odd; ; see Comments.

Original entry on oeis.org

1, 4, 2, 3, 6, 5, 12, 10, 8, 7, 9, 11, 15, 13, 14, 24, 22, 20, 18, 16, 17, 19, 21, 23, 28, 26, 25, 27, 40, 38, 36, 34, 32, 30, 29, 31, 33, 35, 37, 39, 45, 43, 41, 42, 44, 60, 58, 56, 54, 52, 50, 48, 46, 47, 49, 51, 53, 55, 57, 59, 66, 64, 62, 61, 63, 65, 84, 82, 80, 78, 76, 74, 72, 70, 68, 67, 69, 71, 73, 75, 77, 79, 81, 83, 91, 89, 87, 85, 86
Offset: 1

Views

Author

Boris Putievskiy, Oct 17 2024

Keywords

Comments

Row n has length A064455(n). The sequence A064455 is non-monotonic.
The array consists of two triangular arrays alternating row by row.
For odd n, row n consists of permutations of the integers from A001844((n-1)/2) to A265225(n-1). For even n, row n consists of permutations of the integers from A130883(n/2) to A265225(n-1).
These permutations are generated by the algorithm described A130517.
The sequence is an intra-block permutation of the positive integers.

Examples

			Array begins:
     k =  1   2   3   4   5   6
  n=1:    1;
  n=2:    4,  2,  3;
  n=3:    6,  5;
  n=4:   12, 10,  8,  7,  9, 11;
The triangular arrays alternate by row: n=1 and n=3 comprise one, and n=2 and n=4 comprise the other.
Subtracting (n^2 - 1)/2 if n is odd from each term in row n produces a permutation of 1 .. (n+1)/2. Subtracting (n^2 - n)/2 if n is even from each term in row n produces a permutation of 1 .. 3n/2:
  1,
  3, 1, 2,
  2, 1,
  6, 4, 2, 1, 3, 5,
  ...
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Module[{L,R, P,Result},L=Ceiling[Max[x/.NSolve[x*(2*(x-1)-Cos[Pi*(x-1)]+5)-4*n==0,x,Reals]]]; R=n-If[EvenQ[L],(L^2-L)/2,(L^2-1)/2]; P[(L+1)*(2*L-(-1)^L+5)/4]=If[EvenQ[L],3L/2,(L+1)/2]; P[3]=2; P= Abs[2*R-If[EvenQ[L],3L/2,(L+1)/2]-If[2*R<=If[EvenQ[L],3L/2,(L+1)/2]+1,2,1]]; Res=P+If[EvenQ[L],(L^2-L)/2,(L^2-1)/2]; Result=Res; Result] Nmax= 12; Table[a[n],{n,1,Nmax}]

Formula

Linear sequence:
a(n) = P(n) + B(L(n)-1), where L(n) = ceiling(x(n)), x(n) is largest real root of the equation B(x) - n = 0. B(n) = (n+1)*(2*n-(-1)^n+5)/4 = A265225(n). P(n) = A162630(n)/2.
Array T(n,k) (see Example):
T(n, k) = P(n, k) + (n^2 - n)/2 if n is even, T(n, k) = P(n, k) + (n^2 - 1)/2 if n is odd, T(n, k) = P(n, k) + A265225(n-1). P(n, k) = |2k - 3n / 2 - 2| if n is even and if 2k <= 3n / 2 + 1, P(n, k) = |2k - 3n / 2 - 1| if n is even and if 2k > 3n / 2 + 1. P(n, k) = |2k - (n + 1) / 2 - 2| if n is odd and if 2k <= (n + 1) / 2 + 1, P(n, k) = |2k - (n + 1) / 2 - 1| if n is odd and if 2k > (n + 1) / 2 + 1. There are several special cases: P(n, 1) = 3n/2 if n is even, P(n, 1) = (n+1)/2 if n is odd. P(2, 2) = 1. P(n, n) = n/2 - 1 if n is even, P(n, n) = (n-3)/2 if n is odd.

A377136 Triangle 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 the (n+1)-st Fibonacci number for n > 0; see Comments.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 6, 8, 10, 12, 11, 9, 13, 15, 17, 19, 20, 18, 16, 14, 21, 23, 25, 27, 29, 31, 33, 32, 30, 28, 26, 24, 22, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 53, 51, 49, 47, 45, 43, 41, 39, 37, 35, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 88, 86, 84, 82, 80, 78, 76, 74, 72, 70, 68, 66, 64, 62, 60, 58, 56, 89
Offset: 1

Views

Author

Boris Putievskiy, Oct 17 2024

Keywords

Comments

Row n consists of permutation of the integers from F(n+2) to F(n+3) - 1, where F(n) = A000045(n). The permutation is generated using Kevin Ryde's formula from A194959.
The sequence is an intra-block permutation of the positive integers.

Examples

			Triangle begins:
     k =  1   2   3   4   5   6   7   8
  n=1:    1;
  n=2:    2;
  n=3:    3,  4;
  n=4:    5,  7,  6;
  n=5:    8, 10, 12, 11,  9;
  n=6:   13, 15, 17, 19, 20, 18, 16, 14;
Subtracting F(n)-1 from each term in row n produces a permutation of 1 .. F(n):
  1;
  1;
  1,2;
  1,3,2;
  1,3,5,4,2;
  1,3,5,7,8,6,4,2;
  ...
		

Crossrefs

Programs

  • Mathematica
    T[n_,k_]:=Module[{P,Result}, P= If[2*k-1 <=Fibonacci[n],2*k-1,2*(Fibonacci[n]+1-k)]; Result=P+Fibonacci[n+1]-1; Result]; Nmax=6; Table[T[n,k],{n,1,Nmax},{k,1,Fibonacci[n]}]//Flatten

Formula

T(n,k) for 1 <= k <= F(n) (see Example):
T(n,k) = P(n,k) + F(n+1)-1, T(n,k) = P(n,k) + A000045(n+1)-1, where P(n,k) = 2*k-1 if 2*k-1 <= F(n), P(n,k) = 2*(F(n)+1-k) if 2*k-1 > F(n).
Showing 1-6 of 6 results.