A359760
Triangle read by rows. The Kummer triangle, the coefficients of the Kummer polynomials. K(n, k) = binomial(n, k) * oddfactorial(k/2) if k is even, otherwise 0, where oddfactorial(z) := (2*z)!/(2^z*z!).
Original entry on oeis.org
1, 1, 0, 1, 0, 1, 1, 0, 3, 0, 1, 0, 6, 0, 3, 1, 0, 10, 0, 15, 0, 1, 0, 15, 0, 45, 0, 15, 1, 0, 21, 0, 105, 0, 105, 0, 1, 0, 28, 0, 210, 0, 420, 0, 105, 1, 0, 36, 0, 378, 0, 1260, 0, 945, 0, 1, 0, 45, 0, 630, 0, 3150, 0, 4725, 0, 945, 1, 0, 55, 0, 990, 0, 6930, 0, 17325, 0, 10395, 0
Offset: 0
Triangle K(n, k) starts:
[0] 1;
[1] 1, 0;
[2] 1, 0, 1;
[3] 1, 0, 3, 0;
[4] 1, 0, 6, 0, 3;
[5] 1, 0, 10, 0, 15, 0;
[6] 1, 0, 15, 0, 45, 0, 15;
[7] 1, 0, 21, 0, 105, 0, 105, 0;
[8] 1, 0, 28, 0, 210, 0, 420, 0, 105;
[9] 1, 0, 36, 0, 378, 0, 1260, 0, 945, 0;
- John Riordan, Introduction to Combinatorial Analysis, Dover (2002), pp. 85-86.
- Pierre Humbert, Monographie des polynômes de Kummer, Nouvelles annales de mathématiques, journal des candidats aux écoles polytechnique et normale, Serie 5, Volume 1 (1922), pp. 81-92.
- E. E. Kummer, Über die hypergeometrische Reihe, Journal für die reine und angewandte Mathematik 15 (1836): 39-83.
- T. Mansour, M. Schork and M. Shattuck, The Generalized Stirling and Bell Numbers Revisited, Journal of Integer Sequences, Vol. 15 (2012), #12.8.3.
- Ladislav Truksa, Hypergeometric orthogonal systems of polynomials III, Aktuárské vědy, Vol. 2 (1931), No. 4, 177-203, (see p.200).
-
oddfactorial := proc(z) (2*z)! / (2^z*z!) end:
K := (n, k) -> ifelse(irem(k, 2) = 1, 0, binomial(n, k) * oddfactorial(k/2)):
seq(seq(K(n, k), k = 0..n), n = 0..11);
# Alternative, as coefficients of polynomials:
p := (n, x) -> 2^(n/2)*(-1/x^2)^(-n/2)*KummerU(-n/2, 1/2, -1/(2*x^2)):
seq(print(seq(coeff(simplify(p(n, x)), x, k), k = 0..n)), n = 0 ..9);
# Using the exponential generating function:
egf := exp(x + (t*x)^2 / 2): ser := series(egf, x, 12):
seq(print(seq(coeff(n! * coeff(ser, x, n), t, k), k = 0..n)), n = 0..9);
-
K[n_, k_] := K[n, k] = Which[OddQ[k], 0, k == 0, 1, n == k, K[n - 1, n - 2], True, K[n - 1, k] n/(n - k)];
Table[K[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 25 2023 *)
-
from functools import cache
@cache
def K(n: int, k: int) -> int:
if k % 2: return 0
if n < 3: return 1
if n == k: return K(n - 1, n - 2)
return (K(n - 1, k) * n) // (n - k)
for n in range(10): print([K(n, k) for k in range(n + 1)])
A344911
Concatenated Bessel-scaled Pascal triangles. Irregular triangle read by rows, T(n,k) with n >= 0 and 0 <= k <= (2*n*(n + 4) - 1 + (-1)^n)/8.
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 1, 1, 3, 3, 1, 3, 3, 1, 4, 6, 4, 1, 6, 12, 6, 3, 1, 5, 10, 10, 5, 1, 10, 30, 30, 10, 15, 15, 1, 6, 15, 20, 15, 6, 1, 15, 60, 90, 60, 15, 45, 90, 45, 15, 1, 7, 21, 35, 35, 21, 7, 1, 21, 105, 210, 210, 105, 21, 105, 315, 315, 105, 105, 105
Offset: 0
The triangle begins:
[0] [ 1 ]
[1] [ 1, 1 ]
[2] [ 1, 2, 1 ][ 1 ]
[3] [ 1, 3, 3, 1 ][ 3, 3 ]
[4] [ 1, 4, 6, 4, 1 ][ 6, 12, 6 ][ 3 ]
[5] [ 1, 5, 10, 10, 5, 1 ][ 10, 30, 30, 10 ][ 15, 15 ]
[6] [ 1, 6, 15, 20, 15, 6, 1 ][ 15, 60, 90, 60, 15 ][ 45, 90, 45][ 15 ]
.
With the notations in the comment row 7 concatenates:
B(7, 0).C(7) = 1.[1, 7, 21, 35, 35, 21, 7, 1] = [1, 7, 21, 35, 35, 21, 7, 1],
B(7, 1).C(5) = 21.[1, 5, 10, 10, 5, 1] = [21, 105, 210, 210, 105, 21],
B(7, 2).C(3) = 105.[1, 3, 3, 1] = [105, 315, 315, 105],
B(7, 3).C(1) = 105.[1, 1] = [105, 105].
.
p_6(x,y) = x^6 + 6*x^5*y + 15*x^4*y^2 + 20*x^3*y^3 + 15*x^2*y^4 + 6*x*y^5 + y^6 +
15*x^4 + 60*x^3*y + 90*x^2*y^2 + 60*x*y^3 + 15*y^4 + 45*x^2 + 90*x*y + 45*y^2 + 15.
-
P := n -> add(add(n!/(2^k*k!*j!*(n-2*k-j)!)*y^(n-2*k-j)*x^j, j=0..n-2*k), k=0..n/2):
seq(seq(subs(x = 1, y = 1, m), m = [op(P(n))]), n = 0..7);
# Alternatively, without polynomials:
B := (n, k) -> binomial(n, 2*k)*doublefactorial(2*k-1):
C := n -> seq(binomial(n, j), j=0..n):
seq(seq(B(n, k)*C(n-2*k), k = 0..n/2), n = 0..7);
# Based on the e.g.f. of the polynomials:
T := proc(numofrows) local gf, ser, n, m;
gf := exp(t^2/2)*exp(t*(x + y)); ser := series(gf, t, numofrows+1);
for n from 0 to numofrows do [op(sort(n!*expand(coeff(ser, t, n))))];
print(seq(subs(x=1, y=1, m), m = %)) od end: T(7);
-
P[n_] := Sum[ Sum[n! / (2^k k! j! (n - 2k - j)!) y^(n - 2k - j) x^j, {j, 0, n-2k}], {k, 0, n/2}];
DegLexList[p_] := MonomialList[p, {x, y}, "DegreeLexicographic"] /. x->1 /. y->1;
Table[DegLexList[P[n]], {n, 0, 7}] // Flatten
A244492
Triangle read by rows: T(n,k) (n>=2, 0 <= k <= n-2) = n!/(2^i*i!*k!), where k=n-2i (or 0 for entries with wrong parity).
Original entry on oeis.org
1, 0, 3, 3, 0, 6, 0, 15, 0, 10, 15, 0, 45, 0, 15, 0, 105, 0, 105, 0, 21, 105, 0, 420, 0, 210, 0, 28, 0, 945, 0, 1260, 0, 378, 0, 36, 945, 0, 4725, 0, 3150, 0, 630, 0, 45
Offset: 0
Triangle begins:
1;
0, 3;
3, 0, 6;
0, 15, 0, 10;
15, 0, 45, 0, 15;
0, 105, 0, 105, 0, 21;
105, 0, 420, 0, 210, 0, 28;
0, 945, 0, 1260, 0, 378, 0, 36;
945, 0, 4725, 0, 3150, 0, 630, 0, 45;
...
This is
A099174 without the two rightmost diagonals.
-
T[n_, k_] := With[{i = (n-k)/2}, If[EvenQ[n-k], n!/(2^i i! k!), 0]];
Table[T[n, k], {n, 2, 10}, {k, 0, n-2}] // Flatten (* Jean-François Alcover, Nov 25 2018 *)
A378100
Number of involutions in the symmetric group S_n with at least one fixed point.
Original entry on oeis.org
0, 1, 1, 4, 7, 26, 61, 232, 659, 2620, 8551, 35696, 129757, 568504, 2255345, 10349536, 44179711, 211799312, 962854399, 4809701440, 23103935021, 119952692896, 605135328337, 3257843882624, 17175956434375, 95680443760576, 525079354619951, 3020676745975552
Offset: 0
a(4) = 7: (1,2)(3)(4), (1,3)(2)(4), (1,4)(2)(3), (1)(2,3)(4), (1)(2,4)(3), (1)(2)(3,4), (1)(2)(3)(4).
-
a := proc(n)
local k, total, deranged;
total := add(factorial(n)/(factorial(n-2*k)*2^k*factorial(k)), k=0..floor(n/2));
if mod(n, 2) = 0 then
deranged := factorial(n)/(2^(n/2)*factorial(n/2));
else
deranged := 0;
end if;
return total - deranged;
end proc:
seq(a(n), n=1..20);
# second Maple program:
a:= proc(n) option remember; `if`(n<4, [0, 1$2, 4][n+1],
a(n-1)+(2*n-3)*a(n-2)-(n-2)*(a(n-3)+(n-3)*a(n-4)))
end:
seq(a(n), n=0..27); # Alois P. Heinz, Nov 24 2024
-
a[n_] := Module[{total, deranged},
total = Sum[n! / ((n - 2 k)! * 2^k * k!), {k, 0, Floor[n/2]}];
deranged = If[EvenQ[n], n! / (2^(n/2) * (n/2)!), 0];
total - deranged
];
Table[a[n], {n, 1, 20}]
-
my(x='x+O('x^30)); Vec(serlaplace(exp(x+x^2/2)-exp(x^2/2))) \\ Joerg Arndt, Nov 27 2024
-
from math import factorial
def a(n):
total = sum(factorial(n) // (factorial(n - 2 * k) * 2**k * factorial(k))
for k in range(n // 2 + 1))
deranged = factorial(n) // (2**(n // 2) * factorial(n // 2)) if n % 2 == 0 else 0
return total - deranged
print([a(n) for n in range(1, 21)])
Comments