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-3 of 3 results.

A217389 Partial sums of the ordered Bell numbers (number of preferential arrangements) A000670.

Original entry on oeis.org

1, 2, 5, 18, 93, 634, 5317, 52610, 598445, 7685706, 109933269, 1732565842, 29824133437, 556682481818, 11198025452261, 241481216430114, 5557135898411469, 135927902927547370, 3521462566184392693, 96323049885512803826, 2774010846129897006941, 83898835844633970888762
Offset: 0

Views

Author

Emanuele Munarini, Oct 02 2012

Keywords

Crossrefs

See A239914 for another version.

Programs

  • Magma
    A000670:=func;
    [&+[A000670(k): k in [0..n]]: n in [0..19]]; // Bruno Berselli, Oct 03 2012
    
  • Maple
    b:= proc(n, k) option remember;
         `if`(n=0, k!, k*b(n-1, k)+b(n-1, k+1))
        end:
    a:= proc(n) option remember; `if`(n<0, 0, a(n-1)+b(n, 0)) end:
    seq(a(n), n=0..23);  # Alois P. Heinz, Feb 20 2025
  • Mathematica
    t[n_] := Sum[StirlingS2[n, k]k!, {k, 0, n}]; Table[Sum[t[k], {k, 0, n}], {n, 0, 100}]
    (* second program: *)
    Fubini[n_, r_] := Sum[k!*Sum[(-1)^(i+k+r)(i+r)^(n-r)/(i!*(k-i-r)!), {i, 0, k-r}], {k, r, n}]; Fubini[0, 1] = 1; Table[Fubini[n, 1], {n, 0, 20}] // Accumulate (* Jean-François Alcover, Mar 31 2016 *)
  • Maxima
    t(n):=sum(stirling2(n,k)*k!,k,0,n);
    makelist(sum(t(k),k,0,n),n,0,40);
    
  • PARI
    for(n=0,30, print1(sum(k=0,n, sum(j=0,k, j!*stirling(k,j,2))), ", ")) \\ G. C. Greubel, Feb 07 2018

Formula

a(n) = Sum_{k=0..n} t(k), where t = A000670 (ordered Bell numbers).
G.f. = A(x)/(1-x), where A(x) = g.f. for A000670 (see that entry). - N. J. A. Sloane, Apr 12 2014
a(n) ~ n! / (2* (log(2))^(n+1)). - Vaclav Kotesovec, Nov 08 2014

A217388 Alternating sums of the ordered Bell numbers (number of preferential arrangements) A000670.

Original entry on oeis.org

1, 0, 3, 10, 65, 476, 4207, 43086, 502749, 6584512, 95663051, 1526969522, 26564598073, 500293750308, 10141049220135, 220142141757718, 5095512540223637, 125275254488912264, 3260259408767933059, 89541327910560478074, 2588146468333823725041
Offset: 0

Views

Author

Emanuele Munarini, Oct 02 2012

Keywords

Crossrefs

Programs

  • GAP
    List([0..30],n->Sum([0..n],k->(-1)^(n-k)*Sum([0..k], j-> Factorial(j)*Stirling2(k,j)))); # Muniru A Asiru, Feb 07 2018
    
  • Magma
    A000670:=func;
    [&+[(-1)^(n-k)*A000670(k): k in [0..n]]: n in [0..20]]; // Bruno Berselli, Oct 03 2012
    
  • Maple
    with(combinat):
    seq(sum((-1)^(n-k)*sum(factorial(j)*stirling2(k,j), j=0..k), k=0..n), n=0..30); # Muniru A Asiru, Feb 07 2018
  • Mathematica
    t[n_] := Sum[StirlingS2[n, k]k!, {k, 0, n}]; Table[Sum[(-1)^(n - k)t[k], {k, 0, n}], {n, 0, 100}]
    (* second program: *)
    Fubini[n_, r_] := Sum[k!*Sum[(-1)^(i+k+r)(i+r)^(n-r)/(i!*(k-i-r)!), {i, 0, k-r}], {k, r, n}]; Fubini[0, 1] = 1; a[n_] := Sum[(-1)^(n-k) Fubini[k, 1], {k, 0, n}]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Mar 31 2016 *)
  • Maxima
    t(n):=sum(stirling2(n,k)*k!,k,0,n);
    makelist(sum((-1)^(n-k)*t(k),k,0,n),n,0,40);
    
  • PARI
    for(n=0,30, print1(sum(k=0,n, (-1)^(n-k)*sum(j=0,k, j!*stirling(k,j,2))), ", ")) \\ G. C. Greubel, Feb 07 2018
    
  • PARI
    a(n) = sum(k=0, n, k!*stirling(n+2,k+2,2)*(2^(k+1)-1)*(-1)^(n-k)) \\ Mikhail Kurkov, Aug 08 2025

Formula

a(n) = sum((-1)^(n-k)*t(k), k=0..n), where t = A000670 (ordered Bell numbers).
E.g.f.: 1/(2-exp(x))-exp(-x)*log(1/(2-exp(x))). [Typo corrected by Vaclav Kotesovec, Oct 08 2013]
G.f.: 1/(1+x)/Q(0), where Q(k)= 1 - x*(k+1)/(1 - x*(2*k+2)/Q(k+1)); (continued fraction). - Sergei N. Gladkovskii, May 20 2013
a(n) ~ n! /(2*(log(2))^(n+1)). - Vaclav Kotesovec, Oct 08 2013
a(n) = Sum_{k=0..n} k!*Stirling2(n+2,k+2)*(2^(k+1)-1)*(-1)^(n-k). - Mikhail Kurkov, Aug 08 2025

A217391 Partial sums of the squares of the ordered Bell numbers (number of preferential arrangements) A000670.

Original entry on oeis.org

1, 2, 11, 180, 5805, 298486, 22228975, 2258856824, 300194704049, 50529463186170, 10505093602625139, 2643441560563225468, 791779611505017309493, 278371498870260182630654, 113516551713466910954246903, 53143864598655784249290736512, 28309328562668956145157858372537
Offset: 0

Views

Author

Emanuele Munarini, Oct 02 2012

Keywords

Crossrefs

Partial sums of A122725.

Programs

  • Magma
    A000670:=func;
    [&+[A000670(k)^2: k in [0..n]]: n in [0..14]]; // Bruno Berselli, Oct 03 2012
    
  • Mathematica
    t[n_] := Sum[StirlingS2[n, k]k!, {k, 0, n}]; Table[Sum[t[k]^2, {k, 0, n}], {n, 0, 100}]
  • Maxima
    t(n):=sum(stirling2(n,k)*k!,k,0,n);
    makelist(sum(t(k)^2,k,0,n),n,0,40);
    
  • PARI
    for(n=0,30, print1(sum(k=0,n, (sum(j=0,k, j!*stirling(k,j,2)))^2), ", ")) \\ G. C. Greubel, Feb 07 2018

Formula

a(n) = Sum_{k=0..n} t(k)^2 where t = A000670 (ordered Bell numbers).
a(n) ~ (n!)^2 / (4 * (log(2))^(2*n+2)). - Vaclav Kotesovec, Nov 08 2014
Showing 1-3 of 3 results.