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.
%I A362685 #64 Jun 21 2025 11:21:03 %S A362685 0,0,2,0,6,18,0,12,36,84,0,20,60,140,300,0,30,90,210,450,930,0,42,126, %T A362685 294,630,1302,2646,0,56,168,392,840,1736,3528,7112,0,72,216,504,1080, %U A362685 2232,4536,9144,18360,0,90,270,630,1350,2790,5670,11430,22950,45990 %N A362685 Triangle of numbers read by rows, T(n, k) = (n*(n-1))*Stirling2(k, 2), for n >= 1 and 1 <= k <= n. %C A362685 T(n, k) is the number of ways to distribute k labeled items into n labeled boxes so that there are exactly 2 nonempty boxes. %H A362685 Igor Victorovich Statsenko, <a href="https://aeterna-ufa.ru/sbornik/IN-2023-04-2.pdf#page=10">Generalized layout problem</a>, Innovation science No 4-2, State Ufa, Aeterna Publishing House, 2023, pp. 10-13. In Russian. %F A362685 T(n, k) = (n!/(n - L)!) * Stirling2(k, L) with L = 2, T(1, 1) = 0. %e A362685 n\k 1 2 3 4 5 6 7 %e A362685 1: 0 %e A362685 2: 0 2 %e A362685 3: 0 6 18 %e A362685 4: 0 12 36 84 %e A362685 5: 0 20 60 140 300 %e A362685 6: 0 30 90 210 450 930 %e A362685 7: 0 42 126 294 630 1302 2646 %e A362685 ... %e A362685 T(4,2) = 12: {1}{2}{}{} (12 ways). %e A362685 T(4,3) = 36: {12}{3}{}{} (36 ways). %e A362685 T(4,4) = 84: {123}{4}{}{} (84 ways). %p A362685 L := 2: T := (n, k) -> pochhammer(-n, L)*Stirling2(k, L)*((-1)^L): %p A362685 seq(seq(T(n, k), k = 1..n), n = 1..10); %o A362685 (Python) %o A362685 from math import isqrt, comb %o A362685 from sympy.functions.combinatorial.numbers import stirling %o A362685 def A362685(n): return (a:=(m:=isqrt(k:=n<<1))+(k>m*(m+1)))*(a-1)*stirling(n-comb(a,2),2) # _Chai Wah Wu_, Jun 20 2025 %Y A362685 Cf. A002024 (case L=1), A068605 (right diagonal). %K A362685 nonn,tabl %O A362685 1,3 %A A362685 _Igor Victorovich Statsenko_, May 01 2023