A260196
1, -3, followed by -1's.
Original entry on oeis.org
1, -3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
Offset: 0
-
first(m)=vector(m,i,i--;if(i>1,-1,if(i==0,1,if(i==1,-3)))) \\ Anders Hellström, Aug 28 2015
-
Vec(-(2*x^2-4*x+1)/(x-1) + O(x^100)) \\ Colin Barker, Sep 11 2015
A358622
Regular triangle read by rows. T(n, k) = [[n, k]], where [[n, k]] are the second order Stirling cycle numbers (or second order reciprocal Stirling numbers). T(n, k) for 0 <= k <= n.
Original entry on oeis.org
1, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 6, 3, 0, 0, 0, 24, 20, 0, 0, 0, 0, 120, 130, 15, 0, 0, 0, 0, 720, 924, 210, 0, 0, 0, 0, 0, 5040, 7308, 2380, 105, 0, 0, 0, 0, 0, 40320, 64224, 26432, 2520, 0, 0, 0, 0, 0, 0, 362880, 623376, 303660, 44100, 945, 0, 0, 0, 0, 0
Offset: 0
Triangle T(n, k) starts:
[0] 1;
[1] 0, 0;
[2] 0, 1, 0;
[3] 0, 2, 0, 0;
[4] 0, 6, 3, 0, 0;
[5] 0, 24, 20, 0, 0, 0;
[6] 0, 120, 130, 15, 0, 0, 0;
[7] 0, 720, 924, 210, 0, 0, 0, 0;
[8] 0, 5040, 7308, 2380, 105, 0, 0, 0, 0;
[9] 0, 40320, 64224, 26432, 2520, 0, 0, 0, 0, 0;
- Ronald L. Graham, Donald E. Knuth, and Oren Patashnik, Concrete Mathematics, Addison-Wesley, Reading, 2nd ed. 1994, thirty-fourth printing 2022.
A008306 is an irregular subtriangle with more information.
-
P := (n, x) -> (-x)^n*hypergeom([-n, x], [], 1/x):
row := n -> seq(coeff(simplify(P(n, x)), x, k), k = 0..n):
for n from 0 to 9 do row(n) od;
# Alternative:
T := (n, k) -> add(binomial(n, k - j)*abs(Stirling1(n - k + j, j))*(-1)^(k - j), j = 0..k): for n from 0 to 9 do seq(T(n, k), k = 0..n) od;
# Using the e.g.f.:
egf := (exp(t)*(1 - t))^(-z): ser := series(egf, t, 12):
seq(print(seq(n!*coeff(coeff(ser, t, n), z, k), k=0..n)), n = 0..9);
# Using second order Eulerian numbers:
A358622 := proc(n, k) local j;
add(binomial(j, n - 2*k)*combinat:-eulerian2(n - k, j), j = 0..n-k) end:
seq(seq(A358622(n, k), k = 0..n), n = 0..12);
# Using generalized Laguerre polynomials:
P := (n, x) -> (-1)^n*n!*LaguerreL(n, -n - x, -x):
row := n -> seq(coeff(simplify(P(n, x)), x, k), k = 0..n):
seq(print(row(n)), n = 0..9);
-
# recursion over rows
from functools import cache
@cache
def StirlingCycleOrd2(n: int) -> list[int]:
if n == 0: return [1]
if n == 1: return [0, 0]
rov: list[int] = StirlingCycleOrd2(n - 2)
row: list[int] = StirlingCycleOrd2(n - 1) + [0]
for k in range(1, n // 2 + 1):
row[k] = (n - 1) * (rov[k - 1] + row[k])
return row
for n in range(9): print(StirlingCycleOrd2(n))
# Alternative, using function BellMatrix from A264428.
from math import factorial
def f(k: int) -> int:
return factorial(k) if k > 0 else 0
print(BellMatrix(f, 9))
A370518
Triangle of numbers read by rows: T(n,k) = Sum_{i=0..n} binomial(n,i)*(n-i)!*Stirling1(i,k)*TC(n,i) where TC(n,k) = Sum_{i=0..n-k} binomial(n+1,n-k-i)*Stirling2(i+3,i+1)*(-1)^(i) for n >= 0, 0 <= k <= n.
Original entry on oeis.org
1, -5, 1, 14, -9, 1, -18, 29, -12, 1, 0, -22, 35, -14, 1, 0, -26, 15, 25, -15, 1, 0, -60, 4, 75, -5, -15, 1, 0, -204, -56, 259, 70, -56, -14, 1, 0, -912, -484, 1092, 609, -168, -126, -12, 1, 0, -5040, -3708, 5480, 4599, -231, -882, -210, -9, 1, 0, -33120, -30024, 31820, 36350, 3675, -6027, -2370, -300, -5, 1
Offset: 0
n\k 0 1 2 3 4 5 6
0: 1
1: -5 1
2: 14 -9 1
3: -18 29 -12 1
4: 0 -22 35 -14 1
5: 0 -26 15 25 -15 1
6: 0 -60 4 75 -5 -15 1
For m=0 the formula gives the sequence
A130534; for m=1 the formula gives the sequence
A094645. In this case, we assume that
A130534 consists of generalized Stirling numbers of the first kind of zero order, and
A094645 consists of generalized Stirling numbers of the first kind of the first order.
-
C:=(n,k)->n!/(k!*(n-k)!) : T0:=(m,n,k)->sum(C(n+1,n-k-p)*Stirling2(p+m+1,p+1)*((-1)^p), p=0..n-k) : T:=(m,n,k)->sum(C(n,r)*(n-r)!*Stirling1(r,k)*T0(m,n,r), r=0..n) m:=2 : seq(seq T(m,n,k), k=0..n), n=0..10);
A387152
Array read by ascending antidiagonals: A(n, k) = Sum_{j=0..n} binomial(k, j)*|Stirling1(n, j)|.
Original entry on oeis.org
1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 2, 3, 3, 1, 0, 6, 7, 6, 4, 1, 0, 24, 23, 16, 10, 5, 1, 0, 120, 98, 57, 30, 15, 6, 1, 0, 720, 514, 257, 115, 50, 21, 7, 1, 0, 5040, 3204, 1407, 546, 205, 77, 28, 8, 1, 0, 40320, 23148, 9076, 3109, 1021, 336, 112, 36, 9, 1
Offset: 0
Array begins:
[0] 1, 1, 1, 1, 1, 1, 1, ...
[1] 0, 1, 2, 3, 4, 5, 6, ...
[2] 0, 1, 3, 6, 10, 15, 21, ...
[3] 0, 2, 7, 16, 30, 50, 77, ...
[4] 0, 6, 23, 57, 115, 205, 336, ...
[5] 0, 24, 98, 257, 546, 1021, 1750, ...
[6] 0, 120, 514, 1407, 3109, 6030, 10696, ...
[7] 0, 720, 3204, 9076, 20695, 41330, 75356, ...
[8] 0, 5040, 23148, 67456, 157865, 323005, 602517, ...
[9] 0, 40320, 190224, 567836, 1358564, 2837549, 5396650, ...
-
A := (n, k) -> add(binomial(k, j)*abs(Stirling1(n, j)), j = 0..n):
seq(seq(A(n-k, k), k = 0..n), n = 0..10);
# Expanding rows or columns:
RowSer := n -> series((1+x)^k*GAMMA(x + n)/GAMMA(x), x, 12):
Trow := n -> k -> coeff(RowSer(n), x, k):
ColSer := n -> series(orthopoly:-L(n, log(1 - x)), x, 12):
Tcol := k -> n -> n! * coeff(ColSer(k), x, n):
seq(lprint(seq(Trow(n)(k), k = 0..7)), n = 0..9);
seq(lprint(seq(Tcol(k)(n), n = 0..7)), k = 0..9);
-
from functools import cache
@cache
def T(n: int, k: int) -> int:
if n == 0: return 1
if k == 0: return 0
return (n - 1) * T(n - 1, k) + T(n, k - 1) - (n - 2) * T(n - 1, k - 1)
for n in range(7): print([T(n, k) for k in range(7)])
A387205
a(n) = (n - 1)!*(2 + Harmonic(n - 1)) if n >= 1, and a(0) = 1.
Original entry on oeis.org
1, 2, 3, 7, 23, 98, 514, 3204, 23148, 190224, 1752336, 17886240, 200377440, 2444446080, 32256800640, 457822229760, 6954511737600, 112579862169600, 1934780446771200, 35181735469977600, 674855347635302400, 13618752053114880000, 288426695123589120000, 6396478234890670080000
Offset: 0
-
a := n -> if n = 0 then 1 else (n-1)!*(2 + harmonic(n-1)) fi:
ser := series(LaguerreL(2, log(1 - x)), x, 24): a := n -> n! * coeff(ser, x, n):
seq(a(n), n = 0..23);
-
A387205[n_] := If[n == 0, 1, (n - 1)!*(2 + HarmonicNumber[n - 1])];
Array[A387205, 25, 0] (* Paolo Xausa, Aug 29 2025 *)
-
a(n) = if (n>0, (n-1)!*(2 + sum(i=1, n-1, 1/i)), 1); \\ Michel Marcus, Aug 27 2025
A059418
Triangle T(n,k) arising from enumeration of permutations with ordered orbits, read by rows (1<=k<=n).
Original entry on oeis.org
1, 1, 1, 3, 2, 1, 12, 7, 4, 1, 60, 33, 19, 7, 1, 360, 192, 109, 47, 11, 1, 2520, 1320, 737, 344, 102, 16, 1, 20160, 10440, 5742, 2801, 956, 198, 22, 1, 181440, 93240, 50634, 25349, 9493, 2342, 352, 29, 1, 1814400, 927360, 498312, 253426, 101293, 28229
Offset: 1
1; 1,1; 3,2,1; 12,7,4,1; 60,33,19,7,1; ...
Row 3: [12,7,4,1]. There are 6 non-plane recursive trees on 4 nodes.
The total number of nodes of outdegree 0 = 1+2+2+2+2+3 = 12;
The total number of nodes of outdegree 1 = 3+1+1+1+1 = 7;
The total number of nodes of outdegree 2 = 1+1+1+1 = 4;
The total number of nodes of outdegree 3 = 1;
...................................................................
.0o......0o..........0o..........0o.........0o...........0o........
..|.......|........../.\........./.\......../.\........../|\.......
..|.......|........./...\......./...\....../...\......../.|.\......
.1o......1o.......1o.....o3...1o....o2...2o.....o1...../..|..\.....
..|....../.\.......|...........|..........|..........1o..2o...o3...
..|...../...\......|...........|..........|........................
.2o...2o.....o3...2o..........3o.........3o........................
..|................................................................
..|................................................................
.3o................................................................
....................................... - _Peter Bala_, Jul 08 2012
- L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 258, #10, F(n,k).
-
t[n_, k_] := (n - 2)*t[n - 1, k] + t[n - 1, k - 1]; t[n_, n_] := 1; t[n_, 1] = n!/2; Table[t[n, k], {n, 10}, {k, n}] // Flatten (* Robert G. Wilson v, Jul 08 2012 *)
More terms from Larry Reeves (larryr(AT)acm.org), Jan 31 2001
A126682
Square pyramid giving coefficients of Carlo Wood's polynomials, read by successive slices, each slice being read row by row.
Original entry on oeis.org
1, 1, 1, 1, 3, 1, 3, 2, 2, 9, 7, 1, 6, 11, 1, 6, 11, 6, 3, 22, 45, 26, 3, 26, 69, 46, 1, 10, 35, 50, 1, 10, 35, 50, 24, 4, 45, 170, 255, 126, 6, 75, 320, 525, 274, 4, 55, 270, 545, 326, 1, 15, 85, 225, 274, 1, 15, 85, 225, 274, 120, 5, 81, 485, 1335, 1670, 744, 10
Offset: 1
Slice 1:
1
Slice 2:
1 1
1 3
Slice 3:
1 3 2
2 9 7
1 6 11
Slice 4:
1 6 11 6
3 22 45 26
3 26 69 46
1 10 35 50
Note that in Part 4 of the linked file, the order of the rows is reversed, while in its Part 1 the order of both rows and columns is reversed.
A228094
Triangle starting at row 3 read by rows of the number of permutations in the n-th Dihedral group which are the product of k disjoint cycles, d(n,k), n >= 3, 1 <= k <= n.
Original entry on oeis.org
2, 3, 1, 2, 3, 2, 1, 4, 0, 5, 0, 1, 2, 2, 4, 3, 0, 1, 6, 0, 0, 7, 0, 0, 1, 4, 2, 0, 5, 4, 0, 0, 1, 6, 0, 2, 0, 9, 0, 0, 0, 1, 4, 4, 0, 0, 6, 5, 0, 0, 0, 1, 10, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 4, 2, 2, 2, 0, 7, 6, 0, 0, 0, 0, 1, 12, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 1
Offset: 3
Triangle begins
2, 3, 1;
2, 3, 2, 1;
4, 0, 5, 0, 1;
2, 2, 4, 3, 0, 1;
6, 0, 0, 7, 0, 0, 1;
4, 2, 0, 5, 4, 0, 0, 1;
6, 0, 2, 0, 9, 0, 0, 0, 1;
4, 4, 0, 0, 6, 5, 0, 0, 0, 1;
10, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1;
4, 2, 2, 2, 0, 7, 6, 0, 0, 0, 0, 1;
...
- Robert A. Beeler, How to Count: An Introduction to Combinatorics and Its Applications, Springer International Publishing, 2015. See Theorem 8.4.12 at pp. 246-247.
- Frank Harary and Edgar M. Palmer, Graphical Enumeration, Academic Press, 1973, p. 37.
-
d[n_,k_]:=If[Divisible[n,k],EulerPhi[n/k],0]+If[OddQ[n]&&k==(n+1)/2,n,If[EvenQ[n]&&(k==n/2||k==(n+2)/2),n/2,0]]; Table[d[n,k],{n,3,12},{k,n}]//Flatten (* Stefano Spezia, Jun 26 2023 *)
A237996
Triangular array read by rows. T(n,k) is the number of even permutations of {1,2,...,n} that have exactly k cycles, n >= 0, 0 <= k <= n.
Original entry on oeis.org
1, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 0, 11, 0, 1, 0, 24, 0, 35, 0, 1, 0, 0, 274, 0, 85, 0, 1, 0, 720, 0, 1624, 0, 175, 0, 1, 0, 0, 13068, 0, 6769, 0, 322, 0, 1, 0, 40320, 0, 118124, 0, 22449, 0, 546, 0, 1, 0, 0, 1026576, 0, 723680, 0, 63273, 0, 870, 0, 1
Offset: 0
Triangle begins:
1;
0, 1;
0, 0, 1;
0, 2, 0, 1;
0, 0, 11, 0, 1;
0, 24, 0, 35, 0, 1;
0, 0, 274, 0, 85, 0, 1;
0, 720, 0, 1624, 0, 175, 0, 1;
0, 0, 13068, 0, 6769, 0, 322, 0, 1;
0, 40320, 0, 118124, 0, 22449, 0, 546, 0, 1;
0, 0, 1026576, 0, 723680, 0, 63273, 0, 870, 0, 1;
...
- J. Riordan, Introduction to Combinatorial Analysis, Wiley, 1958, page 87, problem # 20.
-
with(combinat):
b:= proc(n, i, t) option remember; expand(`if`(n=0, t, `if`(i<1,
0, add(x^j*multinomial(n, n-i*j, i$j)*(i-1)!^j/j!*b(n-i*j,
i-1, irem(t+`if`(irem(i,2)=0, j, 0), 2)), j=0..n/i))))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n$2, 1)):
seq(T(n), n=0..12); # Alois P. Heinz, Mar 09 2015
# Alternative:
A132393 := (n, k) -> abs(Stirling1(n, k)):
T := (n, k) -> ifelse((n::even and k::even) or (n::odd and k::odd), A132393(n, k),
0): seq(seq(T(n, k), k = 0..n), n = 0..9); # Peter Luschny, Jun 26 2024
-
nn=11;a=Log[((1+x)/(1-x))^(1/2)];b=Log[1/(1-x^2)^(1/2)];Table[Take[(Range[0,nn]!CoefficientList[Series[Exp[y a]Cosh[y b] ,{x,0,nn}],{x,y}])[[n]],n],{n,1,nn}]//Grid
A292222
Triangle corresponding to the partition array of the M_1 multinomials (A036038).
Original entry on oeis.org
1, 1, 2, 1, 3, 6, 1, 10, 12, 24, 1, 15, 50, 60, 120, 1, 41, 180, 300, 360, 720, 1, 63, 497, 1260, 2100, 2520, 5040, 1, 162, 1484, 6496, 10080, 16800, 20160, 40320, 1, 255, 5154, 20916, 58464, 90720, 151200, 181440, 362880, 1, 637, 13680, 95640, 322560, 584640, 907200, 1512000, 1814400, 3628800
Offset: 1
The triangle T(n, m) begins:
n\m 1 2 3 4 5 6 7 8 9 10 ...
1: 1
2: 1 2
3: 1 3 6
4: 1 10 12 24
5: 1 15 50 60 120
6: 1 41 180 300 360 720
7: 1 63 497 1260 2100 2520 5040
8: 1 162 1484 6496 10080 16800 20160 40320
9: 1 255 5154 20916 58464 90720 151200 181440 362880
10: 1 637 13680 95640 322560 584640 907200 1512000 1814400 3628800
...
T(5, 3) =50 because the partitions are [1^2, 3^1] and [1^1, 2^2] with M_1 numbers 20 = A036038(5, 4) and 30 = A036038(5, 5), respectively, adding to 50.
-
b[n_, i_, t_] := b[n, i, t] = If[t == 1, 1/n!, Sum[b[n - j, j, t - 1]/j!, {j, i, n/t}]];
t[n_, k_] := If[n*k == 0, If[n == k, 1, 0], n!*b[n, 1, k]];
Table[Table[t[n, k], {k, 1, n}], {n, 1, 10}] // Flatten (* Jean-François Alcover, Sep 29 2017, after Alois P. Heinz *)
Comments