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.

A104001 Triangle T(n,k) read by rows: number of permutations in S_n avoiding all k-length patterns starting with fixed m, 2

This page as a plain text file.
%I A104001 #7 Nov 29 2022 04:04:28
%S A104001 2,4,6,8,18,24,16,54,96,120,32,162,384,600,720,64,486,1536,3000,4320,
%T A104001 5040,128,1458,6144,15000,25920,35280,40320,256,4374,24576,75000,
%U A104001 155520,246960,322560,362880,512,13122,98304,375000,933120,1728720,2580480,3265920,3628800
%N A104001 Triangle T(n,k) read by rows: number of permutations in S_n avoiding all k-length patterns starting with fixed m, 2<k<=n, 1<=m<=k.
%H A104001 G. C. Greubel, <a href="/A104001/b104001.txt">Rows n = 3..50 of the triangle, flattened</a>
%H A104001 T. Mansour, <a href="http://arXiv.org/abs/math.CO/9911243">Permutations containing and avoiding certain patterns</a>
%F A104001 T(n, k) = (k-2)! * (k-1)^(n+1-k).
%F A104001 From _G. C. Greubel_, Nov 29 2022: (Start)
%F A104001 T(n, 3) = A000079(n-2).
%F A104001 T(n, 4) = 6*A000244(n-4).
%F A104001 T(n, 5) = 4!*A000302(n-5).
%F A104001 T(2*n-3, n) = A152684(n-1). (End)
%e A104001 Triangle begins as:
%e A104001     2;
%e A104001     4,    6;
%e A104001     8,   18,   24;
%e A104001    16,   54,   96,   120;
%e A104001    32,  162,  384,   600,   720;
%e A104001    64,  486, 1536,  3000,  4320,  5040;
%e A104001   128, 1458, 6144, 15000, 25920, 35280, 40320;
%t A104001 Table[(k-1)!*(k-1)^(n-k), {n,3,15}, {k,3,n}]//Flatten (* _G. C. Greubel_, Nov 29 2022 *)
%o A104001 (Magma) [Factorial(k-1)*(k-1)^(n-k): k in [3..n], n in [3..15]]; // _G. C. Greubel_, Nov 29 2022
%o A104001 (SageMath)
%o A104001 def A104001(n,k): return factorial(k-1)*(k-1)^(n-k)
%o A104001 flatten([[A104001(n,k) for k in range(3,n+1)] for n in range(3,16)]) # _G. C. Greubel_, Nov 29 2022
%Y A104001 Cf. A000079, A000244, A000302, A137268,
%K A104001 nonn,tabl
%O A104001 3,1
%A A104001 _Ralf Stephan_, Feb 26 2005