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

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.

A376276 Table T(n, k) n > 0, k > 2 read by upward antidiagonals. The sequences in each column k is a triangle read by rows (blocks), where each row is a permutation of the numbers of its constituents. The length of the row number n in column k is equal to the n-th k-gonal number A086270.

Original entry on oeis.org

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

Views

Author

Boris Putievskiy, Sep 18 2024

Keywords

Comments

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

Examples

			Table begins:
  k =      3   4   5   6   7   8
--------------------------------------
  n = 1:   1,  1,  1,  1,  1,  1, ...
  n = 2:   3,  4,  4,  5,  5,  6, ...
  n = 3:   4,  3,  5,  4,  6,  5, ...
  n = 4:   2,  5,  3,  6,  4,  7, ...
  n = 5:   8,  2,  6,  3,  7,  4, ...
  n = 6:   7, 10,  2,  7,  3,  8, ...
  n = 7:   9, 11, 13,  2,  8,  3, ...
  n = 8:   6,  9, 12, 15,  2,  9, ...
  n = 9:  10, 12, 14, 16, 18,  2, ...
  n =10:   5,  8, 11, 14, 17, 20, ...
  n =11:  16, 13, 15, 17, 19, 21, ...
  n =12:  15, 7,  10, 13, 16, 19, ...
  n =13:  17, 14, 16, 18, 20, 22, ...
  n =14:  14,  6,  9, 12, 15, 18, ...
  n =15:  18, 23, 17, 19, 21, 23, ...
  n =16:  13, 22,  8, 11, 14, 17, ...
  n =17:  19, 24, 18, 20, 22, 24, ...
  n =18:  12, 21,  7, 10, 13, 16, ...
  n =19:  20, 25, 30, 21, 23, 25, ...
  n =20:  11, 20, 29,  9, 12, 15, ...
          ... .
For k = 3 the first 4 blocks have lengths 1,3,6 and 10.
For k = 4 the first 3 blocks have lengths 1,4, and 9.
For k = 5 the first 3 blocks have lengths 1,5, and 12.
Each block is a permutation of the numbers of its constituents.
The first 6 antidiagonals are:
  1;
  3, 1;
  4, 4, 1;
  2, 3, 4, 1;
  8, 5, 5, 5, 1;
  7, 2, 3, 4, 5, 1;
		

References

  • E. Deza and M. M. Deza, Figurate numbers, World Scientific Publishing (2012), page 45.

Crossrefs

Programs

  • Mathematica
    T[n_,k_]:=Module[{L,R,P,Res,result},L=Ceiling[Max[x/.NSolve[x^3*(k-2)+3*x^2-x*(k-5)-6*n==0,x,Reals]]];
    R=n-(((L-1)^3)*(k-2)+3*(L-1)^2-(L-1)*(k-5))/6;P=Which[OddQ[R]&&OddQ[k*L*(L-1)/2-L^2+2*L],((k*L*(L-1)/2-L^2+2*L+1-R)+1)/2,OddQ[R]&&EvenQ[k*L*(L-1)/2-L^2+2*L],(R+k*L*(L-1)/2-L^2+2*L+1)/2,EvenQ[R]&&OddQ[k*L*(L-1)/2-L^2+2*L],Ceiling[(k*L*(L-1)/2-L^2+2*L+1)/2]+R/2,EvenQ[R]&&EvenQ[k*L*(L-1)/2-L^2+2*L],Ceiling[(k*L*(L-1)/2-L^2+2*L+1)/2]-R/2];
    Res=P+((L-1)^3*(k-2)+3*(L-1)^2-(L-1)*(k-5))/6;result=Res;result]
    Nmax=6;Table[T[n,k],{n,1,Nmax},{k,3,Nmax+2}]

Formula

T(n,k) = P(n,k) + ((L(n,k)-1)^3*(k-2)+3*(L(n,k)-1)^2-(L(n,k)-1)*(k-5))/6, where L(n,k) = ceiling(x(n,k)), x(n,k) is largest real root of the equation x^3*(k - 2) + 3*x^2 - x*(k - 5) - 6*n = 0. R(n,k) = n - ((L(n,k) - 1)^3*(k-2)+3*(L(n,k)-1)^2-(L(n,k)-1)*(k-5))/6. P(n,k) = ((k * L(n,k) * (L(n,k) - 1) / 2) - L(n,k)^2 + 2 * L(n,k) + 2 - R(n,k)) / 2 if R is odd and (k * L(n,k) * (L(n,k) - 1) / 2) - L(n,k)^2 + 2 * L(n,k) is odd, P(n,k) = (R(n,k) + (k * L(n,k) * (L(n,k) - 1) / 2) - L(n,k)^2 + 2 * L(n,k) + 1) / 2 if R is odd and (k * L(n,k) * (L(n,k) - 1) / 2) - L(n,k)^2 + 2 * L(n,k) is even, P(n,k) = ceiling(((k * L(n,k) * (L(n,k) - 1) / 2) - L(n,k)^2 + 2 * L(n,k) + 1) / 2) + (R(n,k) / 2) if R is even and (k * L(n,k) * (L(n,k) - 1) / 2) - L(n,k)^2 + 2 * L(n,k) is odd, P(n,k) = ceiling(((k * L(n,k) * (L(n,k) - 1) / 2) - L(n,k)^2 + 2 * L(n,k) + 1) / 2) - (R(n,k) / 2) if R is even and (k * L(n,k) * (L(n,k) - 1) / 2) - L(n,k)^2 + 2 * L(n,k) is even.
T(1,n) = A000012(n). T(2,n) = A004526(n+7). T(3,n) = A028242(n+6). T(4,n) = A084964(n+5). T(n-2,n) = A000027(n) for n > 3. L(n,3) = A360010(n). L(n,4) = A074279(n).

A376353 Table T(n, k) n > 0, k > 2 read by upward antidiagonals. The sequences in each column k is a triangle read by rows (blocks), where each row is a permutation of the numbers of its constituents. The length of the row number n in column k is equal to the n-th k-pyramidal number A261720.

Original entry on oeis.org

1, 4, 1, 3, 4, 1, 5, 5, 5, 1, 2, 3, 4, 5, 1, 11, 6, 6, 6, 6, 1, 10, 2, 3, 4, 5, 6, 1, 12, 14, 7, 7, 7, 7, 7, 1, 9, 13, 2, 3, 4, 5, 6, 7, 1, 13, 15, 17, 8, 8, 8, 8, 8, 8, 1, 8, 12, 16, 2, 3, 4, 5, 6, 7, 8, 1, 14, 16, 18, 20, 9, 9, 9, 9, 9, 9, 9, 1, 7, 11, 15, 19, 2, 3, 4, 5, 6, 7, 8, 9, 1, 15, 17, 19, 21, 23, 10, 10, 10, 10, 10, 10, 10, 10, 1, 6, 10, 14, 18, 22, 2, 3
Offset: 1

Views

Author

Boris Putievskiy, Sep 21 2024

Keywords

Comments

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

Examples

			Table begins:
  k =      3   4   5   6   7   8
--------------------------------------
  n = 1:   1,  1,  1,  1,  1,  1, ...
  n = 2:   4,  4,  5,  5,  6,  6, ...
  n = 3:   3,  5,  4,  6,  5,  7, ...
  n = 4:   5,  3,  6,  4,  7,  5, ...
  n = 5:   2,  6,  3,  7,  4,  8, ...
  n = 6:  11,  2,  7,  3,  8,  4, ...
  n = 7:  10, 14,  2,  8,  3,  9, ...
  n = 8:  12, 13, 17,  2,  9,  3, ...
  n = 9:   9, 15, 16, 20,  2, 10, ...
  n = 10: 13, 12, 18, 19, 23,  2, ...
  n = 11:  8, 16, 15, 21, 22, 26, ...
  n = 12: 14, 11, 19, 18, 24, 25, ...
  n = 12:  7, 17, 14, 22, 21, 27, ...
  n = 14: 15, 10, 20, 17, 25, 24, ...
  n = 15:  6, 18, 13, 23, 20, 28, ...
          ... .
For k = 3 the first 3 blocks have lengths 1,4 and 10.
For k = 4 the first 2 blocks have lengths 1 and 5.
For k = 5 the first 2 blocks have lengths 1 and 6.
Each block is a permutation of the numbers of its constituents.
The first 6 antidiagonals are:
   1;
   4, 1;
   3, 4, 1;
   5, 5, 5, 1;
   2, 3, 4, 5, 1;
  11, 6, 6, 6, 6, 1;
		

References

  • E. Deza and M. M. Deza, Figurate numbers, World Scientific Publishing (2012), page 93.

Crossrefs

Programs

  • Mathematica
    T[n_,k_]:=Module[{L,R,result},L=Ceiling[Max[x/.NSolve[(k-2)*x^4+2*k*x^3+(14-k)*x^2+(12-2*k)*x-24*n==0,x,Reals]]]; R=n-((k-2)*(L-1)^4+2*k*(L-1)^3+(14-k)*(L-1)^2+(12-2*k)*(L-1))/24; P=Which[OddQ[R]&&OddQ[(L^3*(k-2)+3*L^2-L*(k-5))/6],((L^3*(k-2)+3*L^2-L*(k-5))/6+2-R)/2,OddQ[R]&&EvenQ[(L^3*(k-2)+3*L^2-L*(k-5))/6],(R+(L^3*(k-2)+3*L^2-L*(k-5))/6+1)/2,EvenQ[R]&&OddQ[(L^3*(k-2)+3*L^2-L*(k-5))/6],Ceiling[((L^3*(k-2)+3*L^2-L*(k-5))/6+1)/2]+R/2,EvenQ[R]&&EvenQ[(L^3*(k-2)+3*L^2-L*(k-5))/6],Ceiling[((L^3*(k-2)+3*L^2-L*(k-5))/6+1)/2]-R/2]; Res= P +((k-2)*(L-1)^4+2*k*(L-1)^3+(14-k)*(L-1)^2+(12-2*k)*(L-1))/24; result=Res] Nmax=6; Table[T[n,k],{n,1,Nmax},{k,3,Nmax+2}]

Formula

T(n,k) = P(n,k) + ((k-2)*(L(n,k)-1)^4+2*k*(L(n,k)-1)^3+(14-k)*(L(n,k)-1)^2+(12-2*k)*(L(n,k)-1))/24, where L(n,k) = ceiling(x(n,k)), x(n,k) is largest real root of the equation (k-2)*x^4+2*k*x^3+(14-k)*x^2+(12-2*k)*x-24*n = 0. R(n,k) = n - ((k-2)*(L(n,k)-1)^4+2*k*(L(n,k)-1)^3+(14-k)*(L(n,k)-1)^2+(12-2*k)*(L(n,k)-1))/24. P(n,k) = ((L(n,k)^3*(k-2)+3*L(n,k)^2-L(n,k)*(k-5))/6+2-R(n,k))/2 if R(n,k) is odd and (L(n,k)^3*(k-2)+3*L(n,k)^2-L(n,k)*(k-5))/6 is odd, P(n,k) = ((L(n,k)^3*(k-2)+3*L(n,k)^2-L(n,k)*(k-5))/6+1)+R(n,k))/2 if R(n,k) is odd and (L(n,k)^3*(k-2)+3*L(n,k)^2-L(n,k)*(k-5))/6 is even, P = ceiling(((L(n,k)^3*(k-2)+3*L(n,k)^2-L(n,k)*(k-5))/6+1)/2)+R(n,k)/2) if R(n,k) is even and (L(n,k)^3*(k-2)+3*L(n,k)^2-L(n,k)*(k-5))/6 is odd, P = ceiling(((L(n,k)^3*(k-2)+3*L(n,k)^2-L(n,k)*(k-5))/6+1)/2)-R(n,k)/2) if R(n,k) is even and (L(n,k)^3*(k-2)+3*L(n,k)^2-L(n,k)*(k-5))/6 is even.
T(1,n) = A000012(n). T(2,n) = A004526(n+8). T(3,n) = A028242(n+7). T(4,n) = A084964(n+6). T(5,n) = A168230(n+5). T(n-2,n) = 4*A000012(n) for n > 3. T(n-1,n) = A000027(n) for n > 2.
Showing 1-5 of 5 results.