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-10 of 1370 results. Next

A054767 Period of the sequence of Bell numbers A000110 (mod n).

Original entry on oeis.org

1, 3, 13, 12, 781, 39, 137257, 24, 39, 2343, 28531167061, 156, 25239592216021, 411771, 10153, 48, 51702516367896047761, 39, 109912203092239643840221, 9372, 1784341, 85593501183, 949112181811268728834319677753, 312, 3905, 75718776648063, 117, 1647084
Offset: 1

Views

Author

Eric W. Weisstein, Feb 09 2002

Keywords

Comments

For p prime, a(p) divides (p^p-1)/(p-1) = A023037(p), with equality at least for p up to 19.
Wagstaff shows that N(p) = (p^p-1)/(p-1) is the period for all primes p < 102 and for primes p = 113, 163, 167 and 173. For p = 7547, N(p) is a probable prime, which means that this p may have the maximum possible period N(p) also. See A088790. - T. D. Noe, Dec 17 2008

Crossrefs

Cf. A000110, A023037, A214810. A146093-A146122 gives Bell numbers read mod 3 to mod 32.

Programs

  • Mathematica
    (* Warning: this program is just a verification of the existing data
     and should not be used to extend the sequence beyond a(28) *)
    BellMod[k_, m_] := Mod[Sum[Mod[StirlingS2[k, j], m], {j, 1, k}], m];
    BellMod[k_, 1] := BellB[k];
    period[nn_List] := Module[{lgmin=2, lgmax=5, nn1},
       lg=If[Length[nn]<=lgmax, lgmin, lgmax];
       nn1 = nn[[1;;lg]];
       km=Length[nn]-lg;
       Catch[Do[If[nn1==nn[[k;;k+lg-1]], Throw[k-1]];
       If[k==km, Throw[0]], {k, 2, km}]]];
    dd[n_] := SelectFirst[Table[{d, n/d},
         {d, Divisors[n][[2;;-2]]}], GCD@@#==1&];
    a[1]=1;
    a[p_?PrimeQ] := a[p] = (p^p-1)/(p-1);
    a[n_/;n>4 && dd[n]!={}] := With[{g = dd[n]}, LCM[a[g[[1]]], a[g[[2]]]]];
    a[n_/;MemberQ[FactorInteger[n][[All, 2]], 1]] := a[n]=
       With[{pp = Select[FactorInteger[n], #1[[2]] ==1 &][[All, 1]]},
          a[n/Times@@pp]*Times@@a/@pp];
    a[n_/;n>4 && GCD @@ FactorInteger[n][[All, 2]]>1] := a[n]=
       With[{g=GCD @@ FactorInteger[n][[All, 2]]}, n^(1/g)*a[n^(1-1/g)]];
    a[n_] := period[Table[BellMod[k, n], {k, 1, 28}]];
    Table[a[n], {n, 1, 28}] (* Jean-François Alcover, Jul 31 2012, updated May 06 2024 *)

Formula

If gcd(n,m) = 1, a(n*m) = lcm(a(n), a(m)). But the sequence is not in general multiplicative; e.g. a(2) = 3, a(9) = 39 and a(18) = 39. - Franklin T. Adams-Watters, Jun 06 2006
a(2^s) = 3*2^s for s >= 2 (Theorem 6.4 in the Lunnon article). For an odd prime p, if a(p) = (p^p-1)/(p-1) (which is conjectured to hold for all p), then a(p^s) = p^(s-1)*(p^p-1)/(p-1) (Theorem 6.2 in the Lunnon article). - Jianing Song, Jun 18 2025

Extensions

More information from Phil Carmody, Dec 22 2002
Extended by T. D. Noe, Dec 18 2008
a(26) corrected by Jean-François Alcover, Jul 31 2012
a(18) corrected by Charles R Greathouse IV, Jul 31 2012
a(27)-a(28) from Charles R Greathouse IV, Sep 07 2016

A146093 Bell numbers (A000110) read mod 3.

Original entry on oeis.org

1, 1, 2, 2, 0, 1, 2, 1, 0, 0, 1, 0, 1, 1, 1, 2, 2, 0, 1, 2, 1, 0, 0, 1, 0, 1, 1, 1, 2, 2, 0, 1, 2, 1, 0, 0, 1, 0, 1, 1, 1, 2, 2, 0, 1, 2, 1, 0, 0, 1, 0, 1, 1, 1, 2, 2, 0, 1, 2, 1, 0, 0, 1, 0, 1, 1, 1, 2, 2, 0, 1, 2, 1, 0, 0, 1, 0, 1, 1, 1, 2, 2, 0, 1, 2, 1, 0, 0, 1, 0, 1, 1, 1, 2, 2, 0, 1, 2, 1, 0, 0, 1, 0, 1, 1
Offset: 0

Views

Author

N. J. A. Sloane, Feb 07 2009

Keywords

Crossrefs

Cf. A000110, A146094-A146122. A054767 gives periods. See also A002034.

Programs

Formula

a(n+13) = a(n). - G. C. Greubel, Jan 30 2016

A146122 Bell numbers (A000110) read mod 32.

Original entry on oeis.org

1, 1, 2, 5, 15, 20, 11, 13, 12, 27, 7, 10, 29, 21, 26, 17, 3, 12, 15, 1, 12, 15, 27, 26, 9, 25, 18, 13, 7, 4, 3, 5, 12, 19, 31, 10, 5, 13, 10, 25, 27, 28, 7, 25, 12, 7, 19, 26, 17, 17, 2, 21, 31, 20, 27, 29, 12, 11, 23, 10, 13, 5, 26, 1, 19, 12, 31, 17, 12, 31, 11, 26, 25, 9, 18, 29, 23
Offset: 0

Views

Author

N. J. A. Sloane, Feb 07 2009

Keywords

Crossrefs

Cf. A000110, A146093-A146121 (Bell numbers read mod 3 to mod 31).
Cf. A054767 (periods).

Programs

  • Magma
    [Bell(n) mod 32: n in [0..100]]; // G. C. Greubel, Feb 02 2016
  • Mathematica
    Mod[BellB[Range[0, 100]], 32] (* G. C. Greubel, Feb 02 2016 *)

Formula

a(n) = a(n-96). [See A054767. - Jianing Song, Jun 20 2025]

A303601 Number of ways to write n as a*(a+1)/2 + b*(b+1)/2 + Bell(k) + Bell(m) with 0 <= a <= b and 0 < k <= m, where Bell(k) denotes the k-th Bell number A000110(k).

Original entry on oeis.org

0, 1, 2, 3, 3, 4, 4, 5, 5, 6, 4, 5, 7, 5, 4, 7, 7, 7, 8, 8, 5, 9, 10, 7, 6, 9, 8, 8, 6, 7, 10, 10, 9, 8, 7, 8, 9, 10, 6, 9, 11, 7, 6, 8, 9, 10, 7, 10, 8, 7, 8, 10, 10, 9, 10, 8, 9, 13, 14, 10, 11, 12, 12, 9, 9, 12, 11, 13, 11, 9
Offset: 1

Views

Author

Zhi-Wei Sun, Apr 26 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1. In other words, any integer n > 1 can be expressed as the sum of two triangular numbers and two Bell numbers.
This has been verified for all n = 2..7*10^8. Note that 111277 cannot be written as the sum of two squares and two Bell numbers.
As log(Bell(n)) is asymptotically equivalent to n*log(n), Bell numbers eventually grow faster than any exponential function.
See also A303389, A303540, A303543 and A303637 for similar conjectures.

Examples

			a(2) = 1 with 2 = 0*(0+1)/2 + 0*(0+1)/2 + Bell(1) + Bell(1).
a(3) = 2 with 3 =  0*(0+1)/2 + 1*(1+1)/2 + Bell(1) + Bell(1) = 0*(0+1)/2 + 0*(0+1)/2 + Bell(1) + Bell(2).
		

Crossrefs

Programs

  • Mathematica
    TQ[n_]:=TQ[n]=IntegerQ[Sqrt[8n+1]];
    b[n_]:=b[n]=BellB[n];
    f[n_]:=f[n]=FactorInteger[n];
    g[n_]:=g[n]=Sum[Boole[Mod[Part[Part[f[n],i],1],4]==3&&Mod[Part[Part[f[n],i],2],2]==1],{i,1,Length[f[n]]}]==0;
    QQ[n_]:=QQ[n]=(n==0)||(n>0&&g[n]);
    tab={};Do[r=0;k=1;Label[bb];If[b[k]>n,Goto[aa]];Do[If[QQ[4(n-b[k]-b[j])+1],Do[If[TQ[n-b[k]-b[j]-x(x+1)/2],r=r+1],{x,0,(Sqrt[4(n-b[k]-b[j])+1]-1)/2}]],{j,1,k}];k=k+1;Goto[bb];Label[aa];
    tab=Append[tab,r],{n,1,70}];Print[tab]

A005001 a(n) = Sum_{k=0..n-1} Bell(k), where the Bell numbers Bell(k) are given in A000110.

Original entry on oeis.org

0, 1, 2, 4, 9, 24, 76, 279, 1156, 5296, 26443, 142418, 820988, 5034585, 32679022, 223578344, 1606536889, 12086679036, 94951548840, 777028354999, 6609770560056, 58333928795428, 533203744952179, 5039919483399502, 49191925338483848, 495150794633289137
Offset: 0

Views

Author

Keywords

Comments

Counts rhyme schemes.
Row sums of triangle A137596 starting with offset 1. - Gary W. Adamson, Jan 29 2008
With offset 1 = binomial transform of the Bell numbers, A000110 starting (1, 1, 1, 2, 5, 15, 52, 203, ...). - Gary W. Adamson, Dec 04 2008
a(n) is the number of partitions of the set {1,2,...,n} in which n is either a singleton or it is in a block of consecutive integers. Example: a(3)=4 because we have 123, 1-23, 12-3, and 1-2-3. Deleting the blocks containing n=3, we obtain: empty, 1, 12, 1-2, i.e., all the partitions of the sets: empty, {1}, and {1,2}. - Emeric Deutsch, May 01 2010

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Partial sums of A000110, partial sums give A029761.
Equals A024716(n-1) + 1.
Cf. A137596.
Cf. A171859.

Programs

  • Maple
    with(combinat): seq(add(bell(j), j = 0 .. n-1), n = 0 .. 22); # Emeric Deutsch, May 01 2010
  • Mathematica
    nn=20;Range[0,nn]!CoefficientList[Series[Exp[-1](-Exp[Exp[x]]+Exp[1+x]-Exp[x]ExpIntegralEi[1]+Exp[x]ExpIntegralEi[Exp[x]]),{x,0,nn}],x] (* Geoffrey Critzer, Feb 04 2014 *)
    BellB /@ Range[0, 30] // Accumulate // Prepend[#, 0]& (* Jean-François Alcover, Oct 19 2019 *)
  • Python
    # Python 3.2 or higher required.
    from itertools import accumulate
    A005001_list, blist, a, b = [0,1,2], [1], 2, 1
    for _ in range(30):
        blist = list(accumulate([b]+blist))
        b = blist[-1]
        a += b
        A005001_list.append(a) # Chai Wah Wu, Sep 19 2014

Formula

a(0) = 0; for n >= 0, a(n+1) = 1 + Sum_{j=1..n} (C(n, j)-C(n, j+1))*a(j).
a(n) = A000110(n) - A171859(n). - Emeric Deutsch, May 01 2010
G.f.: x*( 1 + (G(0)+1)*x/(1-x) ) where G(k) = 1 - 2*x*(k+1)/((2*k+1)*(2*x*k+x-1) - x*(2*k+1)*(2*k+3)*(2*x*k+x-1)/(x*(2*k+3) - 2*(k+1)*(2*x*k+2*x-1)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Dec 20 2012
G.f.: x*G(0)/(1-x^2) where G(k) = 1 - 2*x*(k+1)/((2*k+1)*(2*x*k-1) - x*(2*k+1)*(2*k+3)*(2*x*k-1)/(x*(2*k+3) - 2*(k+1)*(2*x*k+x-1)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Dec 22 2012
G.f.: x*( G(0) - 1 )/(1-x) where G(k) = 1 + (1-x)/(1-x*k)/(1-x/(x+(1-x)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jan 21 2013
G.f.: (G(0)-1)*x/(1-x^2) where G(k) = 1 + 1/(1-k*x)/(1-x/(x+1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Feb 06 2013
G.f.: x/(1-x)/(1-x*Q(0)), where Q(k) = 1 + x/(1 - x + x*(k+1)/(x - 1/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 19 2013
E.g.f. A(x) satisfies: A'(x) = A(x) + exp(exp(x)-1). - Geoffrey Critzer, Feb 04 2014
G.f.: (x/(1 - x)) * Sum_{i>=0} x^i / Product_{j=1..i} (1 - j*x). - Ilya Gutkovskiy, Jun 05 2017
a(n) ~ Bell(n) / (n/LambertW(n) - 1). - Vaclav Kotesovec, Jul 28 2021

A126390 a(n) = Sum_{i=0..n} 2^i*B(i)*binomial(n,i) where B(n) = Bell numbers A000110(n).

Original entry on oeis.org

1, 3, 13, 71, 457, 3355, 27509, 248127, 2434129, 25741939, 291397789, 3510328695, 44782460313, 602513988107, 8518757813637, 126179029108463, 1952609274344353, 31492811964616163, 528249539951292461, 9197240228562763687, 165923214676585626729
Offset: 0

Views

Author

N. J. A. Sloane, Aug 04 2007

Keywords

Crossrefs

Programs

  • Maple
    with(combstruct):seq(count(([S, {N=Union(Z, S, P), S=Set(Union(Z, P), card>=0), P=Set(Union(Z, Z), card>=1)}, labeled], size=n)), n=0..20); # Zerinvary Lajos, Mar 18 2008
  • Mathematica
    Table[ Sum[ 2^k Binomial[n, k] BellB[k], {k, 0, n}], {n, 0, 30}] (* Karol A. Penson and Olivier Gérard, Oct 22 2007 *)
  • PARI
    x='x+O('x^66); Vec(serlaplace((exp(exp(2*x)-1+x)))) \\ Joerg Arndt, May 13 2013

Formula

E.g.f.: exp(exp(2*x)-1+x). - Vladeta Jovovic, Aug 04 2007
a(n) = e^(-1)* 2^n * Sum_{k>=0} (k + 1/2)^n / k!. This is a Dobinski-type formula. - Karol A. Penson and Olivier Gérard, Oct 22 2007
G.f.: 1/Q(0), where Q(k)= 1 - (2*k+3)*x - 4*(k+1)*x^2/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 03 2013
G.f.: 1/Q(0), where Q(k)= 1 - x - 2*x/(1 - 2*x*(2*k+1)/(1 - x - 2*x/(1 - 2*x*(2*k+2)/Q(k+1)))); (continued fraction). - Sergei N. Gladkovskii, May 13 2013
a(0) = 1; a(n) = a(n-1) + Sum_{k=1..n} binomial(n-1,k-1) * 2^k * a(n-k). - Ilya Gutkovskiy, Jun 21 2022
From Vaclav Kotesovec, Jun 22 2022: (Start)
a(n) ~ Bell(n) * (2 + LambertW(n)/n)^n.
a(n) ~ Bell(n) * 2^n * sqrt(n) * log(n)^(-1/2 + 1/(2*log(n)) - 1/(2*log(n)^2)) * exp(log(log(n))^2/(4*log(n)^2)). (End)
a(n) ~ 2^n * n^(n + 1/2) * exp(n/LambertW(n) - n - 1) / (sqrt(1 + LambertW(n)) * LambertW(n)^(n + 1/2)). - Vaclav Kotesovec, Jun 27 2022

A126617 a(n) = Sum_{i=0..n} (-2)^(n-i)*B(i)*binomial(n,i) where B(n) = Bell numbers A000110(n).

Original entry on oeis.org

1, -1, 2, -3, 7, -10, 31, -21, 204, 307, 2811, 12100, 74053, 432211, 2768858, 18473441, 129941283, 956187814, 7351696139, 58897405759, 490681196604, 4242903803727, 38014084430983, 352341755256348, 3373662303816313, 33326335433122711, 339232538387804530
Offset: 0

Views

Author

N. J. A. Sloane, Aug 04 2007

Keywords

Comments

a(n) is positive starting at n=8. - Karol A. Penson and Olivier Gérard, Oct 22 2007
Hankel transform is A000178. - Paul Barry, Apr 23 2009

Examples

			G.f.: 1 - 1*x + 2*x^2 - 3*x^3 + 7*x^4 - 10*x^5 + 31*x^6 - 21*x^7 + 204*x^8 + 307*x^9 + 2811*x^10 + 12100*x^11 + 74053*x^12 + 432211*x^13 + ...
		

Crossrefs

Programs

  • Mathematica
    Table[ Sum[ (-2)^(n - k) Binomial[n, k] BellB[k], {k, 0, n}], {n, 0, 50}] (* Karol A. Penson and Olivier Gérard, Oct 22 2007 *)
    With[{nn=30},CoefficientList[Series[Exp[Exp[x]-2x-1],{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Jan 19 2025 *)

Formula

E.g.f.: exp(exp(x)-2*x-1). - Vladeta Jovovic, Aug 04 2007
a(n) = e^(-1) * Sum_{k>=0} (k-2)^n / k!. This is a Dobinski-type formula. - Karol A. Penson and Olivier Gérard, Oct 22 2007
G.f.: 1/(1+x-x^2/(1-2x^2/(1-x-3x^2/(1-2x-4x^2/(1-3x-5x^2/(1-.... (continued fraction). - Paul Barry, Apr 23 2009
Let A be the upper Hessenberg matrix of order n defined by: A[i,i-1]=-1, A[i,j]=binomial(j-1,i-1), (i<=j), and A[i,j]=0 otherwise. Then, for n>=1, a(n)=(-1)^(n)charpoly(A,2). - Milan Janjic, Jul 08 2010
G.f.: -1/U(0) where U(k) = x*k - 1 - x - x^2*(k+1)/U(k+1); (continued fraction, 1-step). - Sergei N. Gladkovskii, Sep 28 2012
G.f.: 1/G(0) where G(k) = 1 + 2*x/(1 + 1/(1 - 2*x*(k+1)/G(k+1))); (continued fraction, 3-step). - Sergei N. Gladkovskii, Nov 23 2012
G.f.: G(0)/(1+3*x) where G(k) = 1 - 2*x*(k+1)/((2*k+1)*(2*x*k-2*x-1) - x*(2*k+1)*(2*k+3)*(2*x*k-2*x-1)/(x*(2*k+3) - 2*(k+1)*(2*x*k-x-1)/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Dec 19 2012
From Sergei N. Gladkovskii, Feb 13 2013: (Start)
Conjecture: if the e.g.f. is E(x)= exp( exp(x) -1 + p*x) then
g.f.: (x+1-p*x)/x/(G(0)-x) - 1/x where G(k) = 2*x + 1 - p*x - x*k + x*(x*k - x - 1 + p*x)/G(k+1); (continued fraction).
So, for this sequence (p=-2), g.f.: (3*x+1)/x/( G(0)-x ) - 1/x where G(k) = 4*x + 1 - x*k + x*(x*k - 3*x - 1)/G(k+1);
(End)
G.f.: 1/Q(0), where Q(k) = 1 + 2*x - x/(1 - x*(k+1)/Q(k+1)); (continued fraction). - Sergei N. Gladkovskii, Apr 22 2013
a(0) = 1; a(n) = -2 * a(n-1) + Sum_{k=0..n-1} binomial(n-1,k) * a(k). - Ilya Gutkovskiy, Jul 30 2021
a(n) ~ n^(n-2) * exp(n/LambertW(n) - n - 1) / (sqrt(1 + LambertW(n)) * LambertW(n)^(n-2)). - Vaclav Kotesovec, Jun 27 2022

Extensions

More terms from Karol A. Penson and Olivier Gérard, Oct 22 2007

A058692 a(n) = B(n) - 1, where B(n) = Bell numbers, A000110.

Original entry on oeis.org

1, 4, 14, 51, 202, 876, 4139, 21146, 115974, 678569, 4213596, 27644436, 190899321, 1382958544, 10480142146, 82864869803, 682076806158, 5832742205056, 51724158235371, 474869816156750, 4506715738447322, 44152005855084345
Offset: 2

Views

Author

N. J. A. Sloane, Dec 30 2000

Keywords

Examples

			G.f. = x^2 + 4*x^3 + 14*x^4 + 51*x^5 + 202*x^6 + 876*x^7 + 4139*x^8 + ...
		

Crossrefs

Column k=2 of both A058710 and A058711 (which are the same except for column k=0).
Cf. A000110.

Programs

Formula

G.f.: Sum_{k > 1} x^k / ((1 - x) * (1 - x^2) * ... * (1 - x^k)). - Michael Somos, Feb 26 2014
E.g.f.: exp(exp(x) - 1) - exp(x). - Ilya Gutkovskiy, Feb 08 2020

A106436 Difference array of Bell numbers A000110 read by antidiagonals.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 1, 2, 3, 5, 4, 5, 7, 10, 15, 11, 15, 20, 27, 37, 52, 41, 52, 67, 87, 114, 151, 203, 162, 203, 255, 322, 409, 523, 674, 877, 715, 877, 1080, 1335, 1657, 2066, 2589, 3263, 4140, 3425, 4140, 5017, 6097, 7432, 9089, 11155, 13744, 17007, 21147
Offset: 0

Views

Author

Philippe Deléham, May 29 2005

Keywords

Comments

Essentially Aitken's array A011971 with first column A000296.
Mirror image of A182930. - Alois P. Heinz, Jan 29 2019

Examples

			   1;
   0,  1;
   1,  1,  2;
   1,  2,  3,  5;
   4,  5,  7, 10, 15;
  11, 15, 20, 27, 37, 52;
  ...
		

Crossrefs

T(2n,n) gives A020556.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, add(
          b(n-j)*binomial(n-1, j-1), j=1..n))
        end:
    T:= proc(n, k) option remember; `if`(k=0, b(n),
          T(n+1, k-1)-T(n, k-1))
        end:
    seq(seq(T(n, d-n), n=0..d), d=0..12);  # Alois P. Heinz, Jan 29 2019
  • Mathematica
    bb = Array[BellB, m = 12, 0];
    dd[n_] := Differences[bb, n];
    A = Array[dd, m, 0];
    Table[A[[n-k+1, k+1]], {n, 0, m-1}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 26 2019 *)
    a[0,0]:=1; a[n_,0]:=a[n-1,n-1]-a[n-1,0]; a[n_,k_]/;0Oliver Seipel, Nov 23 2024 *)

Formula

Double-exponential generating function: sum_{n, k} a(n-k, k) x^n/n! y^k/k! = exp(exp{x+y}-1-x). a(n,k) = Sum_{i=k..n} (-1)^(n-i)*binomial(n-k,i-k)*Bell(i). - Vladeta Jovovic, Oct 14 2006

A124311 a(n) = Sum_{i=0..n} (-2)^i*binomial(n,i)*B(i) where B(n) = Bell numbers A000110(n).

Original entry on oeis.org

1, -1, 5, -21, 121, -793, 5917, -49101, 447153, -4421105, 47062773, -535732805, 6484924585, -83079996041, 1121947980173, -15915567647101, 236442490569825, -3668776058118881, 59316847871113445, -997182232031471477, 17397298225094055897, -314449131128077197561
Offset: 0

Views

Author

N. J. A. Sloane, Aug 04 2007

Keywords

Comments

The sequence has strictly alternating signs. The variant Dobinski-type formula e^(-1)* (2)^n * Sum_{k >= 0} ( (k-1/2)^n / k! ) is strictly positive. - Karol A. Penson and Olivier Gérard, Oct 22 2007

Crossrefs

Programs

  • Magma
    A124311:= func< n | (&+[(-2)^k*Binomial(n,k)*Bell(k): k in [0..n]]) >;
    [A124311(n): n in [0..30]]; // G. C. Greubel, Aug 25 2023
  • Mathematica
    Table[ Sum[ (-2)^(k) Binomial[n, k] BellB[k], {k, 0, n}], {n, 0, 50}] (* Karol A. Penson and Olivier Gérard, Oct 22 2007 *)
    With[{nn=30},CoefficientList[Series[Exp[Exp[-2x]-1+x],{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Mar 04 2016 *)
  • Sage
    def A124311_list(n):  # n>=1
        T = [0]*(n+1); R = [1]
        for m in (1..n-1):
            a,b,c = 1,0,0
            for k in range(m,-1,-1):
                r = a + 2*(k*(b+c)+c)
                if k < m : T[k+2] = u;
                a,b,c = T[k-1],a,b
                u = r
            T[1] = u;
            R.append((-1)^m*sum(T))
        return R
    A124311_list(22)  # Peter Luschny, Nov 02 2012
    
  • SageMath
    def A124311(n): return sum( (-2)^k*binomial(n,k)*bell_number(k) for k in range(n+1) )
    [A124311(n) for n in range(31)] # G. C. Greubel, Aug 25 2023
    

Formula

E.g.f.: exp(exp(-2*x) - 1 + x). - Vladeta Jovovic, Aug 04 2007
G.f.: 1/U(0) where U(k)= 1 + x*(2*k+1) - 4*x^2*(k+1)/U(k+1) ; (continued fraction, 1-step). - Sergei N. Gladkovskii, Oct 11 2012
a(n) ~ (-2)^n * n^(n - 1/2) * exp(n/LambertW(n) - n - 1) / (sqrt(1 + LambertW(n)) * LambertW(n)^(n - 1/2)). - Vaclav Kotesovec, Jun 26 2022
a(0) = 1; a(n) = a(n-1) + Sum_{k=1..n} binomial(n-1,k-1) * (-2)^k * a(n-k). - Ilya Gutkovskiy, Nov 29 2023
Showing 1-10 of 1370 results. Next