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.

Previous Showing 41-50 of 178 results. Next

A081358 E.g.f.: log((1+x) / (1-x)) / (2*(1-x)).

Original entry on oeis.org

0, 1, 2, 8, 32, 184, 1104, 8448, 67584, 648576, 6485760, 74972160, 899665920, 12174658560, 170445219840, 2643856588800, 42301705420800, 740051782041600, 13320932076748800, 259500083163955200, 5190001663279104000, 111422936937037824000, 2451304612614832128000
Offset: 0

Views

Author

Michael Somos, Mar 18 2003

Keywords

Comments

Number of cycles of odd cardinality in all permutations of [n]. Example: a(3)=8 because among (1)(2)(3), (1)(23), (12)(3), (13)(2), (132), (123) we have eight cycles of odd length. - Emeric Deutsch, Aug 12 2004
a(n) is a function of the harmonic numbers. a(n) = n!*h(n) - n!/2 * h(floor(n/2)), where h(n) = Sum_{k=1..n} 1/k. - Gary Detlefs, Aug 06 2010

Examples

			G.f. = x + 2*x^2 + 8*x^3 + 32*x^4 + 184*x^5 + 1104*x^6 + 8448*x^7 + ...
		

References

  • I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, Wiley, N.Y., 1983, Exercise 3.3.13

Crossrefs

Programs

  • Mathematica
    nn = 20; Range[0, nn]! CoefficientList[
      D[Series[(1 - x^2)^(-1/2) ((1 + x)/(1 - x))^(y/2), {x, 0, nn}], y] /. y -> 1, x]  (* Geoffrey Critzer, Aug 27 2012 *)
    a[ n_] := If[ n < 0, 0, n! Sum[ 1/k, {k, 1, n, 2}]]; (* Michael Somos, Jan 06 2015 *)
    a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ Log[ (1 + x) / (1 - x)] / (2 (1 - x)), {x, 0, n}]]; (* Michael Somos, Jan 06 2015 *)
  • PARI
    {a(n) = if( n<1, 0, n! * polcoeff( log(1 + 2 / (-1 + 1 / (x + x * O(x^n)))) / (2 * (1-x)), n))};
    
  • PARI
    {a(n) = if( n<0, 0, n! * sum(k=1, n, (k%2)/k))}; /* Michael Somos, Sep 19 2006 */
    
  • PARI
    first(n) = x='x+O('x^n); Vec(serlaplace(atanh(x)/(1 - x)), -n) \\ Iain Fox, Dec 19 2017

Formula

E.g.f.: log((1+x) / (1-x)) / (2*(1-x)).
a(n) = n! * Sum_{k=0..n, k odd} 1/k.
a(n) = n!/2*(Psi(ceiling(n/2)+1/2)+gamma+2*log(2)). - Vladeta Jovovic, Oct 20 2003
a(n) = n!*Sum_{k=1..n} (-1)^(k+1)*2^(k-1)*binomial(n, k)/k. - Vladeta Jovovic, Aug 12 2005
a(n) = n*a(n-1) + ((-1)^(n+1)+1)/2*(n-1)!. - Gary Detlefs, Aug 06 2010
a(n) = A000254(n) - A092691(n). - Gary Detlefs, Aug 06 2010
a(n) ~ n!/2 * (log(n) + gamma + log(2)), where gamma is the Euler-Mascheroni constant (A001620). - Vaclav Kotesovec, Oct 05 2013
a(2*n + 1) = A049034(n).
E.g.f.: arctanh(x)/(1 - x). - Ilya Gutkovskiy, Dec 19 2017

A126671 Triangle read by rows: row n (n>=0) has g.f. Sum_{i=1..n} n!*x^i*(1+x)^(n-i)/(n+1-i).

Original entry on oeis.org

0, 0, 1, 0, 1, 3, 0, 2, 7, 11, 0, 6, 26, 46, 50, 0, 24, 126, 274, 326, 274, 0, 120, 744, 1956, 2844, 2556, 1764, 0, 720, 5160, 16008, 28092, 30708, 22212, 13068, 0, 5040, 41040, 147120, 304464, 401136, 351504, 212976, 109584, 0, 40320
Offset: 1

Views

Author

N. J. A. Sloane and Carlo Wood (carlo(AT)alinoe.com), Feb 13 2007

Keywords

Comments

The first nonzero column gives the factorial numbers, which are Stirling_1(*,1), the rightmost diagonal gives Stirling_1(*,2), so this triangle may be regarded as interpolating between the first two columns of the Stirling numbers of the first kind.
This is a slice (the right-hand wall) through the infinite square pyramid described in the link. The other three walls give A007318 and A008276 (twice).
The coefficients of the A165674 triangle are generated by the asymptotic expansion of the higher order exponential integral E(x,m=2,n). The a(n) formulas for the coefficients in the right hand columns of this triangle lead to Wiggen's triangle A028421 and their o.g.f.s. lead to the sequence given above. Some right hand columns of the A165674 triangle are A080663, A165676, A165677, A165678 and A165679. - Johannes W. Meijer, Oct 07 2009

Examples

			Triangle begins:
0,
0, 1,
0, 1, 3,
0, 2, 7, 11,
0, 6, 26, 46, 50,
0, 24, 126, 274, 326, 274,
0, 120, 744, 1956, 2844, 2556, 1764,
0, 720, 5160, 16008, 28092, 30708, 22212, 13068,
0, 5040, 41040, 147120, 304464, 401136, 351504, 212976, 109584,
0, 40320, 367920, 1498320, 3582000, 5562576, 5868144, 4292496, 2239344, 1026576, ...
		

Crossrefs

Columns give A000142, A108217, A126672; diagonals give A000254, A067318, A126673. Row sums give A126674. Alternating row sums give A000142.
See A126682 for the full pyramid of coefficients of the underlying polynomials.

Programs

  • Maple
    for n from 1 to 15 do t1:=add( n!*x^i*(1+x)^(n-i)/(n+1-i), i=1..n); series(t1,x,100); lprint(seriestolist(%)); od:
  • Mathematica
    Join[{{0}}, Reap[For[n = 1, n <= 15, n++, t1 = Sum[n!*x^i*(1+x)^(n-i)/(n+1-i), {i, 1, n}]; se = Series[t1, {x, 0, 100}]; Sow[CoefficientList[se, x]]]][[2, 1]]] // Flatten (* Jean-François Alcover, Jan 07 2014, after Maple *)

Formula

Recurrence: T(n,0) = 0; for n>=0, i>=1, T(n+1,i) = (n+1)*T(n,i) + n!*binomial(n,i).
E.g.f.: x*log(1-(1+x)*y)/(x*y-1)/(1+x). - Vladeta Jovovic, Feb 13 2007

A291556 Square array A(n,k), n>=0, k>=0, read by antidiagonals: A(n,k) = (n!)^k * Sum_{i=1..n} 1/i^k.

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 0, 1, 3, 3, 0, 1, 5, 11, 4, 0, 1, 9, 49, 50, 5, 0, 1, 17, 251, 820, 274, 6, 0, 1, 33, 1393, 16280, 21076, 1764, 7, 0, 1, 65, 8051, 357904, 2048824, 773136, 13068, 8, 0, 1, 129, 47449, 8252000, 224021776, 444273984, 38402064, 109584, 9
Offset: 0

Views

Author

Seiichi Manyama, Aug 26 2017

Keywords

Examples

			Square array begins:
   0,  0,   0,     0,      0, ...
   1,  1,   1,     1,      1, ...
   2,  3,   5,     9,     17, ...
   3, 11,  49,   251,   1393, ...
   4, 50, 820, 16280, 357904, ...
		

Crossrefs

Rows n=0-3 give: A000004, A000012, A000051, A074528.
Main diagonal gives A060943.

Programs

  • Maple
    A:= (n, k)-> n!^k * add(1/i^k, i=1..n):
    seq(seq(A(n, d-n), n=0..d), d=0..10);  # Alois P. Heinz, Aug 26 2017
  • Mathematica
    A[0, ] = 0; A[1, ] = 1; A[n_, k_] := A[n, k] = ((n-1)^k + n^k) A[n-1, k] - (n-1)^(2k) A[n-2, k];
    Table[A[n-k, k], {n, 0, 10}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, May 11 2019 *)

Formula

A(0, k) = 0, A(1, k) = 1, A(n+1, k) = (n^k+(n+1)^k)*A(n, k) - n^(2*k)*A(n-1, k).

A065048 Largest unsigned Stirling number of the first kind: max_k(s(n+1,k)); i.e., largest coefficient of polynomial x*(x+1)*(x+2)*(x+3)*...*(x+n).

Original entry on oeis.org

1, 1, 3, 11, 50, 274, 1764, 13132, 118124, 1172700, 12753576, 150917976, 1931559552, 26596717056, 392156797824, 6165817614720, 102992244837120, 1821602444624640, 34012249593822720, 668609730341153280, 13803759753640704000, 298631902863216384000
Offset: 0

Views

Author

Henry Bottomley, Nov 06 2001

Keywords

Comments

n! <= a(n) <= (n+1)!; n <= a(n+1)/a(n) <= (n+1). - Max Alekseyev, Jul 17 2019

Examples

			a(4)=50 since polynomial is x^4 + 10*x^3 + 35*x^2 + 50*x + 24.
		

Crossrefs

Programs

  • Maple
    P:= x: A[0]:= 1:
    for n from 1 to 50 do
      P:= expand(P*(x+n));
      A[n]:= max(coeffs(P,x));
    od:
    seq(A[i],i=0..50); # Robert Israel, Jul 04 2016
  • Mathematica
    a[n_] := Max[Array[Abs[StirlingS1[n+1, #]]&, n+1]];
    Array[a, 100, 0] (* Griffin N. Macris, Jul 03 2016 *)
  • PARI
    a(n) = if (n==0, 1, vecmax(vector(n, k, abs(stirling(n+1, k, 1))))); \\ Michel Marcus, Jul 04 2016; corrected Jun 12 2022
    
  • Python
    from collections import Counter
    def A065048(n):
        c = {1:1}
        for k in range(1,n+1):
            d = Counter()
            for j in c:
                d[j] += k*c[j]
                d[j+1] += c[j]
            c = d
        return max(c.values()) # Chai Wah Wu, Jan 31 2024

Formula

For n in the interval [A309237(k)-1, A309237(k+1)-2], a(n) = |Stirling1(n+1,k)|. - Max Alekseyev, Jul 17 2019

A341587 E.g.f.: log(1 + log(1 - x))^2 / 2.

Original entry on oeis.org

1, 6, 40, 315, 2908, 30989, 375611, 5112570, 77305024, 1286640410, 23387713930, 461187042992, 9808283703684, 223833267479764, 5456669750439788, 141540592345674800, 3892707724320135616, 113153294901088030320, 3466501398608272647984, 111636571036702743967104, 3770483138507706753943584
Offset: 2

Views

Author

Ilya Gutkovskiy, Feb 15 2021

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 22; CoefficientList[Series[Log[1 + Log[1 - x]]^2/2, {x, 0, nmax}], x] Range[0, nmax]! // Drop[#, 2] &
    Table[Sum[Abs[StirlingS1[n, k] StirlingS1[k, 2]], {k, 2, n}], {n, 2, 22}]

Formula

a(n) = Sum_{k=2..n} |Stirling1(n, k) * Stirling1(k, 2)|.
a(n) = Sum_{k=2..n} |Stirling1(n, k)| * (k-1)! * H(k-1), where H(k) is the k-th harmonic number.
a(n) = Sum_{k=1..n-1} binomial(n-1, k) * A003713(k) * A003713(n-k).
a(n) = A052822(n) / 2.
a(n) ~ sqrt(2*Pi) * log(n) * n^(n - 1/2) / (exp(1) - 1)^n * (1 + (gamma - log(exp(1) - 1))/log(n)), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Feb 15 2021

A346921 Expansion of e.g.f. 1 / (1 - log(1 - x)^2 / 2).

Original entry on oeis.org

1, 0, 1, 3, 17, 110, 874, 8064, 85182, 1012248, 13369026, 194245590, 3079135806, 52880064588, 978038495316, 19381794788160, 409702099828104, 9201877089355584, 218832476773294008, 5493266481129425064, 145153549897858762776, 4027310838211114515600
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 07 2021

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 21; CoefficientList[Series[1/(1 - Log[1 - x]^2/2), {x, 0, nmax}], x] Range[0, nmax]!
    a[0] = 1; a[n_] := a[n] = Sum[Binomial[n, k] Abs[StirlingS1[k, 2]] a[n - k], {k, 1, n}]; Table[a[n], {n, 0, 21}]
  • PARI
    my(x='x+O('x^25)); Vec(serlaplace(1/(1-log(1-x)^2/2))) \\ Michel Marcus, Aug 07 2021
    
  • PARI
    a(n) = sum(k=0, n\2, (2*k)!*abs(stirling(n, 2*k, 1))/2^k); \\ Seiichi Manyama, May 06 2022

Formula

a(0) = 1; a(n) = Sum_{k=1..n} binomial(n,k) * |Stirling1(k,2)| * a(n-k).
a(n) ~ n! * exp(sqrt(2)*n) / (sqrt(2) * (exp(sqrt(2)) - 1)^(n+1)). - Vaclav Kotesovec, Aug 08 2021
a(n) = Sum_{k=0..floor(n/2)} (2*k)! * |Stirling1(n,2*k)|/2^k. - Seiichi Manyama, May 06 2022

A000276 Associated Stirling numbers.

Original entry on oeis.org

3, 20, 130, 924, 7308, 64224, 623376, 6636960, 76998240, 967524480, 13096736640, 190060335360, 2944310342400, 48503818137600, 846795372595200, 15618926924697600, 303517672703078400, 6198400928176128000, 132720966600284160000, 2973385109386137600000
Offset: 4

Views

Author

Keywords

Comments

a(n) is also the number of permutations of n elements, without any fixed point, with exactly two cycles. - Shanzhen Gao, Sep 15 2010

Examples

			a(4) = 3 because we have: (12)(34),(13)(24),(14)(23). - _Geoffrey Critzer_, Nov 03 2012
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 256.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 75.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Shanzhen Gao, Permutations with Restricted Structure (in preparation).

Crossrefs

A diagonal of triangle in A008306.

Programs

  • Mathematica
    nn=25;a=Log[1/(1-x)]-x;Drop[Range[0,nn]!CoefficientList[Series[a^2/2,{x,0,nn}],x],4]  (* Geoffrey Critzer, Nov 03 2012 *)
    a[n_] := (n-1)!*(HarmonicNumber[n-2]-1); Table[a[n], {n, 4, 23}] (* Jean-François Alcover, Feb 06 2016, after Gary Detlefs *)
  • PARI
    a(n) = (n-1)!*sum(i=2, n-2, 1/i); \\ Michel Marcus, Feb 06 2016

Formula

a(n) = (n-1)!*Sum_{i=2..n-2} 1/i = (n-1)!*(Psi(n-1)+gamma-1). - Vladeta Jovovic, Aug 19 2003
With alternating signs: Ramanujan polynomials psi_3(n-2, x) evaluated at 1. - Ralf Stephan, Apr 16 2004
E.g.f.: ((x+log(1-x))^2)/2. [Corrected by Vladeta Jovovic, May 03 2008]
a(n) = Sum_{i=2..floor((n-1)/2)} n!/((n-i)*i) + Sum_{i=ceiling(n/2)..floor(n/2)} n!/(2*(n-i)*i). - Shanzhen Gao, Sep 15 2010
a(n) = (n+3)!*(h(n+2)-1), with offset 0, where h(n)=sum(1/k,k=1..n). - Gary Detlefs, Sep 11 2010
Conjecture: (-n+2)*a(n) +(n-1)*(2*n-5)*a(n-1) -(n-1)*(n-2)*(n-3)*a(n-2)=0. - R. J. Mathar, Jul 18 2015
Conjecture: a(n) +2*(-n+2)*a(n-1) +(n^2-6*n+10)*a(n-2) +(n-3)*(n-4)*a(n-3)=0. - R. J. Mathar, Jul 18 2015
a(n) = A000254(n-1) - (n-1)! - (n-2)!. - Anton Zakharov, Sep 24 2016

Extensions

More terms from Christian G. Bower

A001706 Generalized Stirling numbers.

Original entry on oeis.org

1, 9, 71, 580, 5104, 48860, 509004, 5753736, 70290936, 924118272, 13020978816, 195869441664, 3134328981120, 53180752331520, 953884282141440, 18037635241029120, 358689683932346880, 7483713725055744000, 163478034254755584000, 3731670622213083648000
Offset: 0

Views

Author

Keywords

Comments

The asymptotic expansion of the higher order exponential integral E(x,m=3,n=2) ~ exp(-x)/x^3*(1 - 9/x + 71/x^2 - 580/x^3 + 5104/x^4 - 48860/x^5 + the sequence given above). See A163931 and A163932 for more information. - Johannes W. Meijer, Oct 20 2009
a(n-1) is equal to -1 times the coefficient of x of the characteristic polynomial of the n X n matrix whose (i,j)-entry is equal to i+3 if i=j and is equal to 1 otherwise. - John M. Campbell, May 24 2011

References

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

Programs

  • Mathematica
    Table[-Coefficient[CharacteristicPolynomial[Array[KroneckerDelta[#1,#2]((((#1+3)))-1)+1&,{n,n}],x],x,1],{n,1,10}] (* John M. Campbell, May 24 2011 *)

Formula

E.g.f. (with offset 2): log(1 - x)^2 / (2 * (1 - x)^2).
a(n) = Sum_{k=0..n}(-1)^(n+k)*binomial(k+2, 2)*2^k*stirling1(n+2, k+2). - Borislav Crstici (bcrstici(AT)etv.utt.ro), Jan 26 2004
a(n-1) = (1/2)*Sum_{i=0..n} binomial(n, i)*A000254(i)*A000254(n-i). - Benoit Cloitre, Mar 09 2004
If we define f(n,i,a)=sum(binomial(n,k)*stirling1(n-k,i)*product(-a-j,j=0..k-1),k=0..n-i), then a(n-1) = |f(n,2,2)|, for n>=2. - Milan Janjic, Dec 21 2008
a(n) = (n+3)!*((gamma-1)*Psi(n+4)+2+gamma^2-17*gamma/6+sum(Psi(i+4)/(i+4),i = 0 .. n-1)). - Mark van Hoeij, Oct 26 2011

Extensions

More terms from Christian G. Bower

A073596 Expansion of e.g.f. exp(x) * log(1-x)/(x-1).

Original entry on oeis.org

0, 1, 5, 23, 116, 669, 4429, 33375, 283072, 2673321, 27845293, 317274407, 3926774180, 52469606981, 752922837861, 11549166072847, 188596608142560, 3266826328953745, 59830416584102325, 1155208913864163511, 23453274942011893556, 499481183766226468013
Offset: 0

Views

Author

Vladeta Jovovic, Aug 28 2002

Keywords

Comments

a(n) is the total number of cycles obtained by permuting the elements in every subset of {1,2,...,n}. - Geoffrey Critzer, Sep 24 2013

Crossrefs

Column k=2 of A269951 (with a different offset).
Cf. A000254.

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!(Exp(x)*Log(1-x)/(x-1))); [0] cat [Factorial(n)*b[n]: n in [1..m-1]]; // G. C. Greubel, Aug 28 2018
  • Maple
    b:= proc(n) option remember; `if`(n<2, n, n*b(n-1)+(n-1)!) end:
    a:= proc(n) add(b(k)*binomial(n, k), k=0..n) end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Mar 07 2018
  • Mathematica
    nn=19;Range[0,nn]!CoefficientList[Series[Exp[x]Log[1/(1-x)]/(1-x),{x,0,nn}],x] (* Geoffrey Critzer, Sep 24 2013 *)
  • PARI
    x='x+O('x^30); concat([0], Vec(serlaplace(exp(x)*log(1-x)/(x-1)))) \\ G. C. Greubel, Aug 28 2018
    

Formula

Binomial transform of A000254.
a(n) ~ n! * exp(1) * (log(n) + gamma), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Jul 02 2015

A081046 Difference of the first two Stirling numbers of the first kind.

Original entry on oeis.org

1, -2, 5, -17, 74, -394, 2484, -18108, 149904, -1389456, 14257440, -160460640, 1965444480, -26029779840, 370643938560, -5646837369600, 91657072281600, -1579093018675200, 28779361764249600, -553210247226470400
Offset: 0

Views

Author

Paul Barry, Mar 05 2003

Keywords

Crossrefs

Cf. A000254, A008275. Same as A000774 apart from signs.

Programs

  • Mathematica
    Table[StirlingS1[n+1, 1] - StirlingS1[n+1, 2], {n, 0, 20}] (* or *) Table[(-1)^n n! (1+HarmonicNumber[n]), {n, 0, 20}] (* Jean-François Alcover, Feb 11 2016 *)
  • PARI
    a(n) = stirling(n+1, 1, 1) - stirling(n+1, 2, 1); \\ Michel Marcus, Feb 11 2016

Formula

a(n) = s(n, 1)-s(n, 2), s(n, m) = signed Stirling number of the first kind.
E.g.f.: (1+x)^-1 * (1-log(1+x)).
Conjecture: a(n) +(2*n-1)*a(n-1) +(n-1)^2*a(n-2)=0. - R. J. Mathar, Oct 27 2014
Previous Showing 41-50 of 178 results. Next