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.

A373422 Triangle read by rows: T(n,k) = number of permutations of [n] starting from k that have zero (n-1)-th differences. (n>=1, 1<=k<=n).

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 4, 2, 4, 2, 4, 3, 0, 0, 0, 0, 3, 40, 36, 40, 40, 40, 36, 40, 29, 0, 0, 0, 0, 0, 0, 29, 232, 152, 240, 200, 208, 200, 240, 152, 232, 235, 142, 140, 257, 168, 168, 257, 140, 142, 235, 11712, 13216, 12208, 12384, 11408, 11136, 11408, 12384, 12208, 13216, 11712
Offset: 1

Views

Author

Seiichi Manyama, Jun 04 2024

Keywords

Examples

			T(3,1) = 1 because [1,2,3] have zero 2nd differences.
  1 2 3
   1 1
    0
Triangle starts:
    0;
    0,   0;
    1,   0,   1;
    1,   0,   0,   1;
    4,   2,   4,   2,   4;
    3,   0,   0,   0,   0,   3;
   40,  36,  40,  40,  40,  36,  40;
   29,   0,   0,   0,   0,   0,   0,  29;
  232, 152, 240, 200, 208, 200, 240, 152, 232;
  235, 142, 140, 257, 168, 168, 257, 140, 142, 235;
		

Crossrefs

Row sums give 2 * A131502(n-1).

Programs

  • PARI
    tabl(n) = my(nn=vector(n)); forperm([1..n], p, if(sum(k=1, n, (-1)^k*binomial(n-1, k-1)*p[k])==0, nn[p[1]]++)); nn;

Formula

T(n,k) = T(n,n+1-k) for 1<=k<=n.
If p is prime, T(p+1,k) = 0 for 2 <= k <= p.