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.

A096747 Triangle read by rows: T(n,1) = 1, T(n,k) = T(n-1,k)+(n-1)*T(n-1,k-1) for 1<=k<=n+1.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 4, 6, 6, 1, 7, 18, 24, 24, 1, 11, 46, 96, 120, 120, 1, 16, 101, 326, 600, 720, 720, 1, 22, 197, 932, 2556, 4320, 5040, 5040, 1, 29, 351, 2311, 9080, 22212, 35280, 40320, 40320, 1, 37, 583, 5119, 27568, 94852, 212976, 322560, 362880
Offset: 0

Views

Author

Thomas J Engelsma (tom(AT)opertech.com), Dec 05 2004

Keywords

Comments

Note: rows continue as factorials - stopped at second factorial for clarity.
T(n,n) = T(n,n+1) = n!. Sum of row n = n! + s(n,2), where s(n,2) are signless Stirling numbers of the first kind (A081046). T(n,k) = A109822(n,k) for 1<=k<=n (i.e. triangle without the last column is A109822). - Emeric Deutsch, Jul 03 2005
Sum(k=0..n-1, T(n,k))/T(n,n-1) are for n>=1 the harmonic numbers A001008(n)/A002805(n). - Peter Luschny, Sep 15 2014

Examples

			Triangle begins:
*0.........................1
*1......................1.....1
*2...................1.....2.....2
*3................1.....4.....6.....6
*4.............1.....7....18....24....24
*5..........1....11....46....96...120...120
*6.......1....16...101...326...600...720...720
*7....1....22...197...932..2556..4320..5040..5040
T(5,3)=46 because 4*7+18=46
		

Crossrefs

Programs

  • Maple
    T:=proc(n,k) if k=1 then 1 elif k=n+1 then n! else T(n-1,k)+(n-1)*T(n-1,k-1) fi end: for n from 0 to 11 do seq(T(n,k),k=1..n+1) od; # yields sequence in triangular form
    with(combinat): T:=(n,k)->sum(abs(stirling1(n,n-i)),i=0..k-1): for n from 0 to 11 do seq(T(n,k),k=1..n+1) od; # yields sequence in triangular form; Emeric Deutsch, Jul 03 2005
  • Mathematica
    T[n_, k_] := Sum[Abs[StirlingS1[n, n - i]], {i, 0, k}]; T[0, 0] := 1;
    Table[T[n, k], {n, 0, 15}, {k, 0, n}]//Flatten (* G. C. Greubel, Dec 08 2016 *)
  • Sage
    @CachedFunction
    def T(n,k):
        if n == 0: return 1
        if k < 0: return 0
        return T(n-1,k)+(n-1)*T(n-1,k-1)
    for n in range(9): print([T(n,k) for k in (0..n)]) # Peter Luschny, Sep 15 2014

Formula

T(n+1, i) = n*T(n, i-1)+T(n, i)
T(n, k) = sum(|stirling1(n, n-i)|, i=0..k-1) for 1<=k<=n. - Emeric Deutsch, Jul 03 2005
E.g.f. as triangle: g(x,y) = Sum_{n>=0} Sum_{1<=k<=n+1} T(n,k) x^n y^k/n! where
g(x,y) = -y^2/((y-1)*(x*y-1)) - (1-x*y)^(-1/y)*(-y+y^2/(y-1)). - Robert Israel, Nov 28 2016

Extensions

More terms from Emeric Deutsch, Jul 03 2005