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.

Previous Showing 11-12 of 12 results.

A373691 Triangle read by rows T(n, k) is the number of permutations on n elements whose square has k descents, for n >= 1 and 0 <= k <= n-1.

Original entry on oeis.org

1, 2, 0, 4, 2, 0, 10, 6, 6, 2, 26, 22, 48, 22, 2, 76, 68, 276, 260, 40, 0, 232, 214, 1384, 2204, 944, 62, 0, 764, 672, 6240, 16172, 13212, 3048, 200, 12, 2620, 2204, 27096, 103588, 145160, 70740, 10936, 524, 12, 9496, 7354, 113722, 612178, 1338370, 1145614, 364366, 36838, 862, 0
Offset: 1

Views

Author

Michel Marcus, Jun 14 2024

Keywords

Examples

			Triangle begins:
    1;
    2,   0;
    4,   2,    0;
   10,   6,    6,    2;
   26,  22,   48,   22,   2;
   76,  68,  276,  260,  40,  0;
  232, 214, 1384, 2204, 944, 62, 0;
  ...
		

Crossrefs

Cf. A000085 (1st column), A000142 (row sums), A037224 (right diagonal).
Cf. A003483 (square permutations), A008292.

Programs

  • PARI
    sq(p) = vector(#p, k, p[p[k]]);
    nbd(p) = sum(i=1, #p-1, p[i+1] < p[i]);
    row(n) = my(v=vector(n)); for (i=1, n!, v[nbd(sq(numtoperm(n, i)))+1]++;); v;

A383835 Number of permutations of [n] whose compositional square is the identity permutation or its reverse.

Original entry on oeis.org

1, 1, 2, 4, 12, 28, 76, 232, 776, 2632, 9496, 35696, 140272, 568624, 2390480, 10349536, 46208416, 211800992, 997313824, 4809701440, 23758694336, 119952723136, 618884638912, 3257843882624, 17492191242880, 95680444425856, 532985208200576, 3020676745975552
Offset: 0

Views

Author

DarĂ­o Clavijo, May 11 2025

Keywords

Examples

			a(4) = A000085(4) + A037224(4) = 10 + 2 = 12: 1234, 1243, 1324, 1432, 2134, 2143, 3214, 3412, 4231, 4321, 2413, 3142.
		

Crossrefs

Formula

a(n) = A000085(n) + A037224(n) for n > 1.
Previous Showing 11-12 of 12 results.