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.

Showing 1-2 of 2 results.

A097656 Binomial transform of A038507.

Original entry on oeis.org

2, 4, 9, 24, 81, 358, 2021, 13828, 109857, 986922, 9865125, 108507160, 1302065441, 16926805678, 236975181189, 3554627504844, 56874039618753, 966858672535762, 17403456103546565, 330665665962928288, 6613313319249128577
Offset: 0

Views

Author

Ross La Haye, Sep 20 2004

Keywords

Examples

			a(2) = 9 because P(2,0) = 1, P(2,1) = 2, P(2,2) = 2 while C(2,0) = 1, C(2,1) = 2, C(2,2) = 1 and 1 + 1 + 2 + 2 + 2 + 1 = 9.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Sum[n!(k! + 1)/(k!(n - k)!), {k, 0, n}]; Table[ f[n], {n, 0, 20}] (* Robert G. Wilson v, Sep 24 2004 *)

Formula

a(n) = Sum_{k=0..n} n!*(k!+1) / (k!*(n-k)!) = Sum_{k=0..n} (P(n, k) + C(n, k)) = Sum_{k=0..n} P(n, k) + 2^n = A007526(n) + A000079(n). - Ross La Haye, Aug 24 2006

A341101 T(n, k) = Sum_{j=0..k} binomial(n, k - j)*Stirling1(n - k + j, j)*(-1)^(n-k). Triangle read by rows, T(n, k) for 0 <= k <= n.

Original entry on oeis.org

1, 0, 2, 0, 1, 4, 0, 2, 6, 8, 0, 6, 19, 24, 16, 0, 24, 80, 110, 80, 32, 0, 120, 418, 615, 500, 240, 64, 0, 720, 2604, 4046, 3570, 1960, 672, 128, 0, 5040, 18828, 30604, 28777, 17360, 6944, 1792, 256, 0, 40320, 154944, 261656, 259056, 167874, 74592, 22848, 4608, 512
Offset: 0

Views

Author

Peter Luschny, Feb 09 2021

Keywords

Examples

			Triangle starts:
n\k  0     1     2     3     4     5     6     7     8 ...
0:   1
1:   0     2
2:   0     1     4
3:   0     2     6     8
4:   0     6    19    24    16
5:   0    24    80   110    80    32
6:   0   120   418   615   500   240    64
7:   0   720  2604  4046  3570  1960   672   128
8:   0  5040 18828 30604 28777 17360  6944  1792   256
		

Crossrefs

Alternating row sums: (-1)^n*(n+1) = A181983(n+1).
Cf. A000522 (row sums), A097204 (row sums - 2^n), A002627 (row sums - n!).

Programs

  • Maple
    T := (n, k) -> add(binomial(n, k - j)*Stirling1(n - k + j, j)*(-1)^(n-k), j=0..k):
    seq(print(seq(T(n,k), k = 0..n)), n = 0..9);
    # Alternative:
    SP := (n, x) -> (x^n)*hypergeom([-n, x], [], -1/x):
    row := n -> seq(coeff(simplify(SP(n, x)), x, k), k = 0..n):
    for n from 0 to 8 do row(n) od; # Peter Luschny, Nov 23 2022
  • Mathematica
    T[ n_, k_] := If[ n<0, 0, n! * Coefficient[ SeriesCoefficient[ E^(x * z) / (1 - z)^x, {z, 0, n}], x, k]]; (* Michael Somos, Nov 23 2022 *)
  • PARI
    T(n, k) = sum(j=0, k, binomial(n, k-j)*stirling(n-k+j, j, 1)*(-1)^(n-k)); \\ Michel Marcus, Feb 11 2021
    
  • PARI
    {T(n, k) = if( n<0, 0, n! * polcoeff( polcoeff( exp(x*y) / (1 - x + x * O(x^n))^y, n), k))}; /* Michael Somos, Nov 23 2022 */
    
  • Python
    from math import factorial
    from sympy import Symbol, Poly
    x = Symbol("x")
    def Coeffs(p) -> list[int]:
        return list(reversed(Poly(p, x).all_coeffs()))
    def L(n, m, x):
        if n == 0:
            return 1
        if n == 1:
            return 1 - m - 2*x
        return ((2 * (n  - x) - m - 1) * L(n - 1, m, x) / n
              - (n  - x - m - 1) * L(n - 2, m, x) / n)
    def Sylvester(n):
        return (-1)**n * factorial(n) * L(n, n, x)
    for n in range(7):
        print(Coeffs(Sylvester(n))) # Peter Luschny, Dec 13 2022

Formula

Sum_{k=0..n-1} T(n, k) = Sum_{k=0..n} binomial(n, k)*(k! - 1) = A097204(n).
E.g.f. for row polynomials: P(x, z) := Sum_{k>=0} T(n, k) * x^n * z^k/k! = e^(x*z) / (1 - z)^x = 1 + (2*x) * z + (x + 4*x^2) * z^2/2! + ... - Michael Somos, Nov 23 2022
From Peter Luschny, Nov 24 2022: (Start)
T(n, k) = [x^k] (x^n)*hypergeom([-n, x], [], -1/x).
T(n, k) = [x^k] (-1)^n * n! * L(n, -x - n, x), where L(n, a, x) is the n-th generalized Laguerre polynomial. (End)
Showing 1-2 of 2 results.