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.

A105795 Shallow diagonal sums of the triangle k!*Stirling2(n,k): a(n) = Sum_{k=0..floor(n/2)} T(n-k,k) where T is A019538.

Original entry on oeis.org

1, 0, 1, 1, 3, 7, 21, 67, 237, 907, 3741, 16507, 77517, 385627, 2024301, 11174587, 64673997, 391392667, 2470864941, 16237279867, 110858862477, 784987938907, 5755734591981, 43636725010747, 341615028340557, 2758165832945947, 22940755633301421, 196354180631212027
Offset: 0

Views

Author

Paul Barry, Apr 20 2005

Keywords

Comments

From Gus Wiseman, Jan 08 2019: (Start)
Also the number of set partitions of {1,...,n} into blocks of sizes > 1 whose minima form an initial interval of positive integers. For example, the a(5) = 7 set partitions are:
{{1,2,3,4,5}}
{{1,3},{2,4,5}}
{{1,4},{2,3,5}}
{{1,5},{2,3,4}}
{{1,3,4},{2,5}}
{{1,3,5},{2,4}}
{{1,4,5},{2,3}}
Also the number of ordered set partitions of {1,...,n-k} of length k, for any 0 <= k <= n. For example, the a(5) = 7 ordered set partitions are:
{{1,2,3,4}}
{{1},{2,3}}
{{2},{1,3}}
{{3},{1,2}}
{{1,2},{3}}
{{1,3},{2}}
{{2,3},{1}}
(End)

Examples

			a(8) = 1!*Stirling2(7,1) + 2!*Stirling2(6,2) + 3!*Stirling2(5,3) + 4!*Stirling2(4,4) = 1 + 62 + 150 + 24 = 237. - _Peter Bala_, Jul 09 2014
		

Crossrefs

Programs

  • Maple
    a:= n-> add(Stirling2(n-k, k)*k!, k=0..n/2):
    seq(a(n), n=0..30);  # Alois P. Heinz, Jul 09 2014
  • Mathematica
    Table[Sum[StirlingS2[n-k, k]*k!, {k,0,n/2}],{n,0,20}] (* Vaclav Kotesovec, Jul 16 2014 *)
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Sum[Length[Join@@Permutations/@Select[sps[Range[n-k]],Length[#]==k&]],{k,0,n}],{n,0,10}] (* Gus Wiseman, Jan 08 2019 *)
  • PARI
    /* From Paul Barry's formula: */
    {a(n)=sum(k=0,floor(n/2), sum(i=0,k,(-1)^i*binomial(k, i)*(k-i)^(n-k)))} \\ Paul D. Hanna, Dec 28 2013
    for(n=0,30,print1(a(n),", "))
    
  • PARI
    /* From e.g.f. series involving iterated integration: */
    {INTEGRATE(n,F)=local(G=F);for(i=1,n,G=intformal(G));G}
    {a(n)=local(A=1+x);A=1+sum(k=1,n,INTEGRATE(k,(exp(x+x*O(x^n))-1)^k ));n!*polcoeff(A,n)} \\ Paul D. Hanna, Dec 28 2013

Formula

a(n) = sum{k=0..floor(n/2), sum{(-1)^i*binomial(k, i)*(k-i)^(n-k)}}.
E.g.f.: Sum_{n>=0} Integral^n (exp(x) - 1)^n dx^n, where integral^n F(x) dx^n is the n-th integration of F(x) with no constant of integration. - Paul D. Hanna, Dec 28 2013
Formal o.g.f.: 1/(1 + x)*sum {n >= 0} 1/(1 - n*x)*(x/(1 + x))^n = 1 + x^2 + x^3 + 3*x^4 + 7*x^5 + .... Cf. A229046. - Peter Bala, Jul 09 2014