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.

A375797 Table T(n, k) 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. Row number n in column k has length n*k = A003991(n,k); see Comments.

Original entry on oeis.org

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

Views

Author

Boris Putievskiy, Aug 29 2024

Keywords

Comments

A208233 presents an algorithm for generating permutations, where each generated permutation is self-inverse.
The sequence in each column k possesses two properties: it is both a self-inverse permutation and an intra-block permutation of natural numbers.

Examples

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

Crossrefs

Programs

  • Mathematica
    T[n_,k_]:=Module[{L,R,P,result},L=Ceiling[(Sqrt[8*n*k+k^2]-k)/(2*k)]; R=n-k*(L-1)*L/2; P=(((-1)^Max[R,k*L+1-R]+1)*R-((-1)^Max[R,k*L+1-R]-1)*(k*L+1-R))/2; result=P+k*(L-1)*L/2]
    Nmax=18; Table[T[n,k],{n,1,Nmax},{k,1,Nmax}]

Formula

T(n,k) = P(n,k) + k*(L(n,k)-1)*L(n,k)/2 = P(n,k) + A062707(L(n-1),k), where L(n,k) = ceiling((sqrt(8*n*k+k^2)-k)/(2*k)), R(n,k) = n-k*(L(n,k)-1)*L(n,k)/2, P(n,k) = (((-1)^max(R(n,k),k*L(n,k)+1-R(n,k))+1)*R(n,k)-((-1)^max(R(n,k),k*L(n,k)+1-R(n,k))-1)*(k*L(n,k)+1-R(n,k)))/2.
T(n,1) = A188568(n). T(1,k) = A093178(k). T(n,n) = A124625(n). L(n,1) = A002024(n). L(n,2) = A000194(n). L(n,3) = A111651(n). L(n,4) = A371355(n). R(n,1) = A002260(n). R(n,2) = A074294(n).