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 21-24 of 24 results.

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

Views

Author

Peter Luschny, Jan 13 2023

Keywords

Comments

The Kummer numbers K(n, k) are a refinement of the oddfactorial numbers (A001147) in the sense that they are the coefficients of polynomials K(n, x) = Sum_{n..k} K(n, k) * x^k that take the value oddfactorial(n) at x = 1. The coefficients of x^n are the aerated oddfactorial numbers A123023.
These numbers appear in many different versions (see the crossrefs). They are the coefficients of the Chebyshev-Hermite polynomials in signed form when ordered in decreasing powers. Our exposition is based on the seminal paper by Kummer, which preceded the work of Chebyshev and Hermite for more than 20 years. They are also referred to as Bessel numbers of the second kind (Mansour et al.) when the odd powers are omitted.

Examples

			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;
		

References

  • John Riordan, Introduction to Combinatorial Analysis, Dover (2002), pp. 85-86.

Crossrefs

Variants: Signed version: A073278. Other variants are the irregular triangle A100861 with zeros deleted, A066325 and A099174 with reversed rows, A111924, A144299, A104556.

Programs

  • Maple
    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);
  • Mathematica
    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 *)
  • Python
    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)])

Formula

Let p(n, x) = 2^(n/2)*(-1/x^2)^(-n/2)*KummerU(-n/2, 1/2, -1/(2*x^2)).
p(n, 1) = A000085(n); p(n, sqrt(2)) = A047974(n); p(n, 2) = A115329(n);
p(2, n) = A002522(n) (n >= 1); p(3, n) = A056107(n) (n >= 1);
p(n, n) = A359739(n) (n >= 1); 2^n*p(n, 1/2) = A005425(n).
K(n, k) = [x^k] p(n, x).
K(n, k) = [t^k] (n! * [x^n] exp(x + (t*x)^2 / 2)).
K(n, n) = A123023(n).
K(n, n-1) = A123023(n + 1).
K(2*n, 2*n) = A001147(n).
K(4*n, 2*n) = A359761, the central terms without zeros.
K(2*n+2, 2*n) = A001879.
Sum_{k=0..n} (-1)^n * i^k * K(n, k) = A001464(n), ((the number of even involutions) - (the number of odd involutions) in the symmetric group S_n (Robert Israel)).
Sum_{k=0..n} Sum_{j=0..k} K(n, j) = A000085(n + 1).
For a recursion see the Python program.

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

Views

Author

Peter Luschny, Jun 03 2021

Keywords

Comments

Let p(n) = Sum_{k=0..n/2} Sum_{j=0..n-2*k} (n!/(2^k*k!*j!*(n-2*k-j)!))*x^j*y^(n-2*k-j). Row n of the triangle is defined as the coefficient list of the polynomials p(n), where the monomials are in degree-lexicographic order.
One observes: The triangle of the coefficients appears as a series of concatenated subtriangles. The first one is Pascal's triangle A007318. Appending the rows of triangle A094305 on the right side starts in row 2. In row 4, the next triangle is appended, which is A344565. This scheme goes on indefinitely.
This can be formalized as follows: Let C(n) denote row n of the binomial triangle, set c.C(n) = Seq_{j=0..n} c*binomial(n, j), and let B(n, k) denote the Bessel numbers A100861(n, k). Then T(n) = Seq_{k=0..n/2} B(n, k).C(n-2*k). Since B(n, k) = binomial(n, 2*k)*(2*k - 1)!! it follows that: T(n) = Seq_{k=0..n/2} Seq_{j=0..n-2*k} binomial(n, 2*k)*binomial(n-2*k, j)*(2*k-1)!!. This expression equals the coefficient list of p(n) since the monomials are in degree-lexicographic order.
The polynomials are also the unsigned, probabilist's Hermite polynomials H_n(x+y)
which are discussed in A344678. The coefficients are listed there in a different order which do not reveal the structure described above.

Examples

			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.
		

Crossrefs

Cf. A005425 (row sums), A100861 (scaling factors).

Programs

  • Maple
    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);
  • Mathematica
    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

Formula

The bivariate e.g.f. exp(t^2/2)*exp(t*(x + y)) = Sum_{n>=0} H_n(x + y)*t^n/n!, where H_n(x) are the unsigned, modified Hermite polynomials A099174, is given by Tom Copeland in A344678.

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

Views

Author

N. J. A. Sloane, Jul 05 2014

Keywords

Examples

			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;
  ...
		

Crossrefs

This is A099174 without the two rightmost diagonals.

Programs

  • Mathematica
    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

Views

Author

Maniru Ibrahim, Nov 16 2024

Keywords

Comments

In other words, a(n) is the number of involutions in S_n that are not derangements.

Examples

			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).
		

Crossrefs

Cf. A000085 (involutions), A000166 (derangements), A002467 (permutations with a fixed point), A099174, A123023 (involutions that are derangements).

Programs

  • Maple
    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
  • Mathematica
    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}]
  • PARI
    my(x='x+O('x^30)); Vec(serlaplace(exp(x+x^2/2)-exp(x^2/2))) \\ Joerg Arndt, Nov 27 2024
  • Python
    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)])
    

Formula

a(n) = Sum_{k=0..floor(n/2)} n! / ((n-2k)! * 2^k * k!) - (n! / (2^(n/2) * (n/2)!) * (1 - (n mod 2))).
a(n) = A000085(n) - A123023(n).
a(n) = A000085(n) for odd n.
From Alois P. Heinz, Nov 24 2024: (Start)
E.g.f.: exp(x*(2+x)/2)-exp(x^2/2).
a(n) = Sum_{k=1..n} A099174(n,k). (End)
Previous Showing 21-24 of 24 results.