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 16 results. Next

A000254 Unsigned Stirling numbers of first kind, s(n+1,2): a(n+1) = (n+1)*a(n) + n!.

Original entry on oeis.org

0, 1, 3, 11, 50, 274, 1764, 13068, 109584, 1026576, 10628640, 120543840, 1486442880, 19802759040, 283465647360, 4339163001600, 70734282393600, 1223405590579200, 22376988058521600, 431565146817638400, 8752948036761600000, 186244810780170240000
Offset: 0

Views

Author

Keywords

Comments

Number of permutations of n+1 elements with exactly two cycles.
Number of cycles in all permutations of [n]. Example: a(3) = 11 because the permutations (1)(2)(3), (1)(23), (12)(3), (13)(2), (132), (123) have 11 cycles altogether. - Emeric Deutsch, Aug 12 2004
Row sums of A094310: In the symmetric group S_n, each permutation factors into k independent cycles; a(n) = sum k over S_n. - Harley Flanders (harley(AT)umich.edu), Jun 28 2004
The sum of the top levels of the last column over all deco polyominoes of height n. A deco polyomino is a directed column-convex polyomino in which the height, measured along the diagonal, is attained only in the last column. Example: a(2)=3 because the deco polyominoes of height 2 are the vertical and horizontal dominoes, the levels of their last columns being 2 and 1, respectively. - Emeric Deutsch, Aug 12 2006
a(n) is divisible by n for all composite n >= 6. a(2*n) is divisible by 2*n + 1. - Leroy Quet, May 20 2007
For n >= 2 the determinant of the n-1 X n-1 matrix M(i,j) = i + 2 for i = j and 1 otherwise (i,j = 1..n-1). E.g., for n = 3 the determinant of [(3, 1), (1, 4)]. See 53rd Putnam Examination, 1992, Problem B5. - Franz Vrabec, Jan 13 2008, Mar 26 2008
The numerator of the fraction when we sum (without simplification) the terms in the harmonic sequence. (1 + 1/2 = 2/2 + 1/2 = 3/2; 3/2 + 1/3 = 9/6 + 2/6 = 11/6; 11/6 + 1/4 = 44/24 + 6/24 = 50/24;...). The denominator of this fraction is n!*A000142. - Eric Desbiaux, Jan 07 2009
The asymptotic expansion of the higher order exponential integral E(x,m=2,n=1) ~ exp(-x)/x^2*(1 - 3/x + 11/x^2 - 50/x^3 + 274/x^4 - 1764/x^5 + 13068/x^6 - ...) leads to the sequence given above. See A163931 and A028421 for more information. - Johannes W. Meijer, Oct 20 2009
a(n) is the number of permutations of [n+1] containing exactly 2 cycles. Example: a(2) = 3 because the permutations (1)(23), (12)(3), (13)(2) are the only permutations of [3] with exactly 2 cycles. - Tom Woodward (twoodward(AT)macalester.edu), Nov 12 2009
It appears that, with the exception of n= 4, a(n) mod n = 0 if n is composite and = n-1 if n is prime. - Gary Detlefs, Sep 11 2010
a(n) is a multiple of A025527(n). - Charles R Greathouse IV, Oct 16 2012
Numerator of harmonic number H(n) = Sum_{i=1..n} 1/i when not reduced. See A001008 (Wolstenholme numbers) for the reduced numerators. - Rahul Jha, Feb 18 2015
The Stirling transform of this sequence is A222058(n) (Harmonic-geometric numbers). - Anton Zakharov, Aug 07 2016
a(n) is the (n-1)-st elementary symmetric function of the first n numbers. - Anton Zakharov, Nov 02 2016
The n-th iterated integral of log(x) is x^n * (n! * log(x) - a(n))/(n!)^2 + a polynomial of degree n-1 with arbitrary coefficients. This can be proven using the recurrence relation a(n) = (n-1)! + n*a(n-1). - Mohsen Maesumi, Oct 31 2018
Primes p such that p^3 | a(p-1) are the Wolstenholme primes A088164. - Amiram Eldar and Thomas Ordowski, Aug 08 2019
Total number of left-to-right maxima (or minima) in all permutations of [n]. a(3) = 11 = 3+2+2+2+1+1: (1)(2)(3), (1)(3)2, (2)1(3), (2)(3)1, (3)12, (3)21. - Alois P. Heinz, Aug 01 2020

Examples

			(1-x)^-1 * (-log(1-x)) = x + 3/2*x^2 + 11/6*x^3 + 25/12*x^4 + ...
G.f. = x + x^2 + 5*x^3 + 14*x^4 + 94*x^5 + 444*x^6 + 3828*x^7 + 25584*x^8 + ...
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 833.
  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, identities 186-190.
  • N. Bleistein and R. A. Handelsman, Asymptotic Expansions of Integrals, Dover Publications, 1986, see page 2. MR0863284 (89d:41049)
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 217.
  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 226.
  • Shanzhen Gao, Permutations with Restricted Structure (in preparation).
  • K. Javorszky, Natural Orders: De Ordinibus Naturalibus, 2016, ISBN 978-3-99057-139-2.
  • 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).

Crossrefs

Programs

  • Magma
    a:=[]; for n in [1..22] do a:=a cat [Abs(StirlingFirst(n,2))]; end for; a; // Marius A. Burtea, Jan 01 2020
  • Maple
    A000254 := proc(n) option remember; if n<=1 then n else n*A000254(n-1)+(n-1)!; fi; end: seq(A000254(n),n=0..21);
    a := n -> add(n!/k, k=1..n): seq(a(n), n=0..21); # Zerinvary Lajos, Jan 22 2008
  • Mathematica
    Table[ (PolyGamma[ m ]+EulerGamma) (m-1)!, {m, 1, 24} ] (* Wouter Meeussen *)
    Table[ n!*HarmonicNumber[n], {n, 0, 19}] (* Robert G. Wilson v, May 21 2005 *)
    Table[Sum[1/i,{i,1,n}]/Product[1/i,{i,1,n}],{n,1,30}] (* Alexander Adamchuk, Jul 11 2006 *)
    Abs[StirlingS1[Range[20],2]] (* Harvey P. Dale, Aug 16 2011 *)
    Table[Gamma'[n + 1] /. EulerGamma -> 0, {n, 0, 30}] (* Li Han, Feb 14 2024*)
  • Maxima
    a(n):=(-1)^(n+1)/2*(n+1)*sum(k*bern(k-1)*stirling1(n,k),k,1,n); /* Vladimir Kruchinin, Nov 20 2016 */
    
  • MuPAD
    A000254 := proc(n) begin n*A000254(n-1)+fact(n-1) end_proc: A000254(1) := 1:
    
  • PARI
    {a(n) = if( n<0, 0, (n+1)! / 2 * sum( k=1, n, 1 / k / (n+1-k)))} /* Michael Somos, Feb 05 2004 */
    
  • Sage
    [stirling_number1(i, 2) for i in range(1, 22)]  # Zerinvary Lajos, Jun 27 2008
    

Formula

Let P(n,X) = (X+1)*(X+2)*(X+3)*...*(X+n); then a(n) is the coefficient of X; or a(n) = P'(n,0). - Benoit Cloitre, May 09 2002
Sum_{k > 0} a(k) * x^k/ k!^2 = exp(x) *(Sum_{k>0} (-1)^(k+1) * x^k / (k * k!)). - Michael Somos, Mar 24 2004; corrected by Warren D. Smith, Feb 12 2006
a(n) is the coefficient of x^(n+2) in (-log(1-x))^2, multiplied by (n+2)!/2.
a(n) = n! * Sum_{i=1..n} 1/i = n! * H(n), where H(n) = A001008(n)/A002805(n) is the n-th harmonic number.
a(n) ~ 2^(1/2)*Pi^(1/2)*log(n)*n^(1/2)*e^-n*n^n. - Joe Keane (jgk(AT)jgk.org), Jun 06 2002
E.g.f.: log(1 - x) / (x-1). (= (log(1 - x))^2 / 2 if offset 1). - Michael Somos, Feb 05 2004
D-finite with recurrence: a(n) = a(n-1) * (2*n - 1) - a(n-2) * (n - 1)^2, if n > 1. - Michael Somos, Mar 24 2004
a(n) = A081358(n)+A092691(n). - Emeric Deutsch, Aug 12 2004
a(n) = n!*Sum_{k=1..n} (-1)^(k+1)*binomial(n, k)/k. - Vladeta Jovovic, Jan 29 2005
p^2 divides a(p-1) for prime p > 3. a(n) = (Sum_{i=1..n} 1/i) / Product_{i=1..n} 1/i. - Alexander Adamchuk, Jul 11 2006
a(n) = 3* A001710(n) + 2* A001711(n-3) for n > 2; e.g., 11 = 3*3 + 2*1, 50 = 3*12 + 2*7, 274 = 3*60 + 2*47, ... - Gary Detlefs, May 24 2010
a(n) = A138772(n+1) - A159324(n). - Gary Detlefs, Jul 05 2010
a(n) = A121633(n) + A002672(n). - Gary Detlefs, Jul 18 2010
a(n+1) = Sum_{i=1..floor((n-1)/2)} n!/((n-i)*i) + Sum_{i=ceiling(n/2)..floor(n/2)} n!/(2*(n-i)*i). - Shanzhen Gao, Sep 14 2010
From Gary Detlefs, Sep 11 2010: (Start)
a(n) = (a(n-1)*(n^2 - 2*n + 1) + (n + 1)!)/(n - 1) for n > 2.
It appears that, with the exception of n = 2, (a(n+1)^2 - a(n)^2) mod n^2 = 0 if n is composite and 4*n if n is prime.
It appears that, with the exception of n = 2, (a(n+1)^3 - a(n)^2) mod n = 0 if n is composite and n - 2 if n is prime.
It appears that, with the exception of n = 2, (a(n)^2 + a(n+1)^2) mod n = 0 if n is composite and = 2 if n is prime. (End)
a(n) = Integral_{x=0..oo} (x^n - n!)*log(x)*exp(-x) dx. - Groux Roland, Mar 28 2011
a(n) = 3*n!/2 + 2*(n-2)!*Sum_{k=0..n-3} binomial(k+2,2)/(n-2-k) for n >= 2. - Gary Detlefs, Sep 02 2011
a(n)/(n-1)! = ml(n) = n*ml(n-1)/(n-1) + 1 for n > 1, where ml(n) is the average number of random draws from an n-set with replacement until the total set has been observed. G.f. of ml: x*(1 - log(1 - x))/(1 - x)^2. - Paul Weisenhorn, Nov 18 2011
a(n) = det(|S(i+2, j+1)|, 1 <= i,j <= n-2), where S(n,k) are Stirling numbers of the second kind. - Mircea Merca, Apr 06 2013
E.g.f.: x/(1 - x)*E(0)/2, where E(k) = 2 + E(k+1)*x*(k + 1)/(k + 2). - Sergei N. Gladkovskii, Jun 01 2013 [Edited by Michael Somos, Nov 28 2013]
0 = a(n) * (a(n+4) - 6*a(n+3) + 7*a(n+2) - a(n+1)) - a(n+1) * (4*a(n+3) - 6*a(n+2) + a(n+1)) + 3*a(n+2)^2 unless n=0. - Michael Somos, Nov 28 2013
For a simple way to calculate the sequence, multiply n! by the integral from 0 to 1 of (1 - x^n)/(1 - x) dx. - Rahul Jha, Feb 18 2015
From Ilya Gutkovskiy, Aug 07 2016: (Start)
Inverse binomial transform of A073596.
a(n) ~ sqrt(2*Pi*n) * n^n * (log(n) + gamma)/exp(n), where gamma is the Euler-Mascheroni constant A001620. (End)
a(n) = ((-1)^(n+1)/2*(n+1))*Sum_{k=1..n} k*Bernoulli(k-1)*Stirling1(n,k). - Vladimir Kruchinin, Nov 20 2016
a(n) = (n)! * (digamma(n+1) + gamma), where gamma is the Euler-Mascheroni constant A001620. - Pedro Caceres, Mar 10 2018
From Andy Nicol, Oct 21 2021: (Start)
Gamma'(x) = a(x-1) - (x-1)!*gamma, where Gamma'(x) is the derivative of the gamma function at positive integers and gamma is the Euler-Mascheroni constant. E.g.:
Gamma'(1) = -gamma, Gamma'(2) = 1-gamma, Gamma'(3) = 3-2*gamma,
Gamma'(22) = 186244810780170240000 - 51090942171709440000*gamma. (End)
From Peter Bala, Feb 03 2022: (Start)
The following are all conjectural:
E.g.f.: for nonzero m, (1/m)*Sum_{n >= 1} (-1)^(n+1)*(1/n)*binomial(m*n,n)* x^n/(1 - x)^(m*n+1) = x + 3*x^2/2! + 11*x^3/3! + 50*x^4/4! + ....
For nonzero m, a(n) = (1/m)*n!*Sum_{k = 1..n} (-1)^(k+1)*(1/k)*binomial(m*k,k)* binomial(n+(m-1)*k,n-k).
a(n)^2 = (1/2)*n!^2*Sum_{k = 1..n} (-1)^(k+1)*(1/k^2)*binomial(n,k)* binomial(n+k,k). (End)
From Mélika Tebni, Jun 20 2022: (Start)
a(n) = -Sum_{k=0..n} k!*A021009(n, k+1).
a(n) = Sum_{k=0..n} k!*A094587(n, k+1). (End)
a(n) = n! * 1/(1 - 1^2/(3 - 2^2/(5 - 3^2/(7 - ... - (n - 1)^2/((2*n - 1)))))). - Peter Bala, Mar 16 2024

A103718 Triangle of coefficients of certain polynomials used with prime numbers as variables in the computation of the array A103728.

Original entry on oeis.org

1, 2, -1, 5, -4, 1, 17, -17, 7, -1, 74, -85, 45, -11, 1, 394, -499, 310, -100, 16, -1, 2484, -3388, 2359, -910, 196, -22, 1, 18108, -26200, 19901, -8729, 2282, -350, 29, -1, 149904, -227708, 185408, -89733, 26985, -5082, 582, -37, 1, 1389456, -2199276, 1896380, -993005, 332598, -72723, 10320, -915, 46, -1
Offset: 0

Views

Author

Wolfdieter Lang, Feb 24 2005

Keywords

Comments

The g.f. for the sequence {b(N,p)}, with b(N,p) the number of cyclically inequivalent two-color, N bead necklaces with p beads of one color and N-p beads of the other color is, for prime numbers p, G(p(n),x):=P(p(n)-1,x)/((1-x)^(p(n)-1)*(1-x^p(n))), with the numerator polynomial P(p(n)-1,x):= sum(r(n,k)*x^k,k=0..p(n)-1) and the row polynomials of this triangle r(n,k):=sum(a(k,m)*p(n)^m,m=0..k). p(n)=A000040(n) (prime numbers).
Row sums (signed) give A000142(k)=k!. Row sums (unsigned) coincide with A007680(k)=(2*k+1)*k!, k>=0.
The (unsigned) column sequences are, for m=0..10: A000774, A081052, A103719-A103727.

Examples

			Triangle begins:
    1;
    2,   -1;
    5,   -4,    1;
   17,  -17,    7,   -1;
   74,  -85,   45,  -11,    1;
  394, -499,  310, -100,   16,   -1;
  ...
		

Crossrefs

Cf. A008275.

Programs

  • Mathematica
    a[0, 0] = 1; a[k_, 0] := (k - 1)! + k*a[k - 1, 0]; a[k_, m_]:= If[kIndranil Ghosh, Mar 11 2017 *)
  • PARI
    a(k, m) = if(m==0, if(k==0, 1, (k - 1)! + k*a(k - 1, 0)) , if(kIndranil Ghosh, Mar 11 2017

Formula

a(k, m) = ((-1)^m)*(|S1(k+1, m+1)| + |S1(k+1, m+2)|) = ((-1)^m)*(|S1(k+2, m+2)|-k*|S1(k+1, m+2)|), with the (signed) Stirling number triangle S1(n, m) = A048994(n, m), n >= m >= 0.
a(0, 0)=1, a(k, 0) = (k-1)! + k*a(k-1, 0); a(k, m) = -a(k-1, m-1) + k*a(k-1, m), m > 0 and a(k, m)=0 if k < m.
Let B = (n+1)-st row of Stirling cycle numbers (unsigned, A008275); say a,b,c,d,.... Then n-th row of present triangle = ((a+b), (b+c), (c+d), ..., (d)). E.g., 4th row of the Stirling cycle numbers = (6, 11, 6, 1). Then third row of A103718 = ((6+11), (11+6), (6+1), (1)) = (17, 17, 7, 1). - Gary W. Adamson, May 07 2006

Extensions

More terms from Indranil Ghosh, Mar 11 2017

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

A093344 a(n) = n! * Sum_{i=1..n} (1/i)*Sum_{j=0..i-1} 1/j!.

Original entry on oeis.org

0, 1, 4, 17, 84, 485, 3236, 24609, 210572, 2004749, 21033900, 241237001, 3003349124, 40345599957, 581765196884, 8963453118065, 146969877361116, 2555361954692189, 46963373856864092, 909707559383702169, 18524816853636447380, 395634467245613474981
Offset: 0

Views

Author

Ralf Stephan, Apr 26 2004

Keywords

Crossrefs

Equals for n=>1 the row sums of A165674 and A093905. - Johannes W. Meijer, Oct 16 2009

Programs

  • Maple
    f:= gfun:-rectoproc({a(0) = 0, a(1) = 1, a(2) = 4, a(n) = 2*n*a(n-1) + (2-n^2)*a(n-2) + (n-2)^2*a(n-3)},a(n),remember):
    seq(f(n),n=0..50); # Robert Israel, Oct 28 2015
  • Mathematica
    Round@Table[E n! Sum[Gamma[k, 1]/k!, {k, 1, n}], {n, 0, 20}]
    Round@Table[E ((HarmonicNumber[n] + ExpIntegralEi[-1] - EulerGamma) n! + HypergeometricPFQ[{n+1,n+1},{n+2,n+2},-1]/(n+1)^2), {n, 0, 20}] (* Vladimir Reshetnikov, Oct 28 2015 *)
  • PARI
    a(n) = n!*sum(i=1,n,1/i*sum(j=0,i-1,1/j!))

Formula

E.g.f.: exp(1)*(Ei(1,1-x)-Ei(1,1))/(1-x). - Vladeta Jovovic, May 05 2007
a(n) = Integral_{x=1..oo} exp(1-x)*(x^n*log(x) - n!/x) dx. - Groux Roland, Mar 12 2011
From Vladimir Reshetnikov, Oct 28 2015: (Start)
a(n) = exp(1)*(H(n)*n! + (Ei(-1)-gamma)*n! + hypergeom([n+1,n+1],[n+2,n+2],-1)/(n+1)^2), where H(n)*n! = A000254(n), -Ei(-1) is A099285, gamma is A001620.
Recurrence: a(0) = 0, a(1) = 1, a(2) = 4, a(n) = 2*n*a(n-1) + (2-n^2)*a(n-2) + (n-2)^2*a(n-3).
(End)
a(n) = n!*e*Sum_{k=1..n} Gamma(k,1)/k!. - Robert Israel, Oct 28 2015

A350015 Irregular triangle read by rows: T(n,k) is the number of n-permutations whose third-longest cycle has length exactly k; n >= 0, 0 <= k <= floor(n/3).

Original entry on oeis.org

1, 1, 2, 5, 1, 17, 7, 74, 46, 394, 311, 15, 2484, 2241, 315, 18108, 17627, 4585, 149904, 152839, 57897, 2240, 1389456, 1460944, 705600, 72800, 14257440, 15326180, 8673060, 1660120, 160460640, 175421214, 110271546, 31600800, 1247400, 1965444480, 2177730270, 1469308698, 559402272, 55135080
Offset: 0

Views

Author

Steven Finch, Dec 08 2021

Keywords

Comments

If the permutation has no third cycle, then its third-longest cycle is defined to have length 0.

Examples

			Triangle begins:
[0]      1;
[1]      1;
[2]      2;
[3]      5,      1;
[4]     17,      7;
[5]     74,     46;
[6]    394,    311,    15;
[7]   2484,   2241,   315;
[8]  18108,  17627,  4585;
[9] 149904, 152839, 57897, 2240;
...
		

Crossrefs

Column 0 gives 1 together with A000774.
Row sums give A000142.

Programs

  • Maple
    b:= proc(n, l) option remember; `if`(n=0, x^l[1], add((j-1)!*
          b(n-j, sort([l[], j])[2..4])*binomial(n-1, j-1), j=1..n))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, [0$3])):
    seq(lprint(T(n)), n=0..14);  # Alois P. Heinz, Dec 11 2021
  • Mathematica
    b[n_, l_] := b[n, l] = If[n == 0, x^l[[1]], Sum[(j - 1)!*b[n - j, Sort[Append[l, j]][[2 ;; 4]]]*Binomial[n - 1, j - 1], {j, 1, n}]];
    T[n_] := With[{p = b[n, {0, 0, 0}]}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]];
    Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Dec 28 2021, after Alois P. Heinz *)

Formula

Sum_{k=0..floor(n/3)} k * T(n,k) = A332852(n) for n >= 3. - Alois P. Heinz, Dec 12 2021

A350016 Irregular triangle read by rows: T(n,k) is the number of n-permutations whose third-shortest cycle has length exactly k; n >= 0, 0 <= k <= max(0,n-2).

Original entry on oeis.org

1, 1, 2, 5, 1, 17, 1, 6, 74, 11, 15, 20, 394, 56, 60, 120, 90, 2484, 407, 525, 490, 630, 504, 18108, 3235, 4725, 2240, 4620, 4032, 3360, 149904, 29143, 40509, 27440, 26460, 33264, 30240, 25920, 1389456, 291394, 398790, 319760, 163800, 302400, 277200, 259200, 226800
Offset: 0

Views

Author

Steven Finch, Dec 08 2021

Keywords

Comments

If the permutation has no third cycle, then its third-longest cycle is defined to have length 0.

Examples

			Triangle begins:
[0]      1;
[1]      1;
[2]      2;
[3]      5,     1;
[4]     17,     1,     6;
[5]     74,    11,    15,    20;
[6]    394,    56,    60,   120,    90;
[7]   2484,   407,   525,   490,   630,   504;
[8]  18108,  3235,  4725,  2240,  4620,  4032,  3360;
[9] 149904, 29143, 40509, 27440, 26460, 33264, 30240, 25920;
...
		

Crossrefs

Column 0 gives 1 together with A000774.
Column 1 gives the column 3 of A208956.
Row sums give A000142.

Programs

  • Maple
    m:= infinity:
    b:= proc(n, l) option remember; `if`(n=0, x^`if`(l[3]=m,
          0, l[3]), add(b(n-j, sort([l[], j])[1..3])
                   *binomial(n-1, j-1)*(j-1)!, j=1..n))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, [m$3])):
    seq(T(n), n=0..10);  # Alois P. Heinz, Dec 11 2021
  • Mathematica
    m = Infinity;
    b[n_, l_] := b[n, l] = If[n == 0, x^If[l[[3]] == m, 0, l[[3]]], Sum[b[n-j, Sort[Append[l, j]][[1;;3]]]*Binomial[n - 1, j - 1]*(j - 1)!, {j, 1, n}]];
    T[n_] := With[{p = b[n, {m, m, m}]}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]];
    Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Dec 28 2021, after Alois P. Heinz *)

Formula

Sum_{k=0..n-2} k * T(n,k) = A332907(n) for n >= 3. - Alois P. Heinz, Dec 12 2021

A000776 a(n) = n! * (1 + 2*Sum_{k=1..n} 1/k).

Original entry on oeis.org

1, 3, 8, 28, 124, 668, 4248, 31176, 259488, 2416032, 24886080, 281004480, 3451887360, 45832538880, 654109585920, 9986000371200, 162391354675200, 2802498609254400, 51156349822771200, 984775394044108800, 19938798081699840000, 423580563732049920000
Offset: 0

Views

Author

Keywords

Comments

a(n-1) equals -1 times the coefficient of x of the characteristic polynomial of the n X n matrix whose (i,j)-entry is equal to i if i=j and is equal to 1 otherwise. - John M. Campbell, May 23 2011

Crossrefs

Cf. A000774.

Programs

  • Maple
    a := proc(n) option remember: if(n=0)then return 1: fi: return n*a(n-1)+2*(n-1)!: end: seq(a(n),n=0..21); # Nathaniel Johnston, Jun 14 2011
  • Mathematica
    Table[-Coefficient[CharacteristicPolynomial[Array[KroneckerDelta[#1, #2] (((#1)) - 1) + 1 &, {n, n}], x], x], {n, 1, 10}] (* John M. Campbell, May 23 2011 *)
    Table[n! (1 + 2 HarmonicNumber[n]), {n, 0, 30}] (* Jean-François Alcover, Feb 11 2016 *)

Formula

E.g.f. (with offset 1): log(1-x)*(log(1-x)-1). - Vladeta Jovovic, Nov 19 2009
a(0)=1, a(n+1) = (n+1)*a(n) + 2*n!, n > 0. - Sean A. Irvine, Jun 14 2011

Extensions

Incorrect formula deleted by Mark van Hoeij, Nov 11 2009
Offset corrected by Gary Detlefs, Jul 13 2010

A344639 Array read by ascending antidiagonals: A(n, k) is the number of (n, k)-poly-Cauchy permutations.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 6, 5, 4, 1, 24, 17, 13, 8, 1, 120, 74, 51, 35, 16, 1, 720, 394, 244, 161, 97, 32, 1, 5040, 2484, 1392, 854, 531, 275, 64, 1, 40320, 18108, 9260, 5248, 3148, 1817, 793, 128, 1, 362880, 149904, 70508, 36966, 20940, 12134, 6411, 2315, 256, 1
Offset: 0

Views

Author

Stefano Spezia, May 25 2021

Keywords

Comments

An (n, k)-poly-Cauchy permutation is a permutation which satisfies the properties listed by Bényi and Ramírez in Definition 1.

Examples

			n\k|   0     1     2     3     4 ...
---+----------------------------
0  |   1     1     1     1     1 ...
1  |   1     2     4     8    16 ...
2  |   2     5    13    35    97 ...
3  |   6    17    51   161   531 ...
4  |  24    74   244   854  3148 ...
...
		

Crossrefs

Rows n=0..2 give A000012, A000079, A007689.
Columns k=0..5 give A000142, A000774, |A223899|, |A223901|, |A223902|, |A223904|.
Main diagonal gives A192563.
Antidiagonal sums give A344640.

Programs

  • Mathematica
    A[n_,k_]:=Sum[Abs[StirlingS1[n,m]](m+1)^k,{m,0,n}]; Flatten[Table[A[n-k,k],{n,0,9},{k,0,n}]]

Formula

A(n, k) = Sum_{m=0..n} abs(S1(n, m)) * (m + 1)^k, where S1 indicates the signed Stirling numbers of first kind (see Theorem 5 in Bényi and Ramírez).
A(n, 0) = n! = A000142(n) (see Example 6 in Bényi and Ramírez).
A(1, k) = 2^k = A000079(k) (see Example 7 in Bényi and Ramírez).
A(2, k) = 2^k + 3^k = A007689(k) (see Example 8 in Bényi and Ramírez).
Sum_{m=0..n} (-1)^m*S2(n, m)*A(m, k) = (-1)^n*(n + 1)^k, where S2 indicates the Stirling numbers of the second kind (see Theorem 9 in Bényi and Ramírez).
A(n, k) = Sum_{j=0..k} j! * abs(S1(n+1, j+1)) * S2(k+1, j+1) (see Theorem 14 in Bényi and Ramírez).
A(n, k) = (n - 1)*A(n-1, k) + Sum_{i=0..k} C(k, i)*A(n-1, k-i) for n > 0 (see Theorem 15 in Bényi and Ramírez).
A(n, k) = Sum_{i=0..n} Sum_{j=0..k} C(n-1, i)*i!*C(k, j)*A(n-1-i, k-j) for n > 0 (see Theorem 17 in Bényi and Ramírez).
A(n, k) = Sum_{m=0..n} Sum_{i=0..m} C(k-i, m-i)*S2(k, i)*abs(S1(n+1, m+1)) (see Theorem 18 in Bényi and Ramírez).
From Seiichi Manyama, Apr 15 2025: (Start)
E.g.f. of column k: Sum_{j>=0} (j+1)^k * (-log(1-x))^j / j!.
E.g.f. of column k: (1/(1-x)) * Sum_{j=0..k} Stirling2(k+1,j+1) * (-log(1-x))^j. (End)

A382823 Square array A(n,k), n >= 0, k >= 0, read by antidiagonals downwards, where A(n,k) = n! * k! * [x^n * y^k] 1 / ( (1-x) * (1-y) * (1 - log(1-x) * log(1-y)) ).

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 6, 5, 5, 6, 24, 17, 17, 17, 24, 120, 74, 69, 69, 74, 120, 720, 394, 338, 337, 338, 394, 720, 5040, 2484, 1962, 1894, 1894, 1962, 2484, 5040, 40320, 18108, 13228, 12194, 12152, 12194, 13228, 18108, 40320, 362880, 149904, 101812, 89160, 87320, 87320, 89160, 101812, 149904, 362880
Offset: 0

Views

Author

Seiichi Manyama, Apr 05 2025

Keywords

Examples

			Square array begins:
    1,   1,    2,     6,    24,    120, ...
    1,   2,    5,    17,    74,    394, ...
    2,   5,   17,    69,   338,   1962, ...
    6,  17,   69,   337,  1894,  12194, ...
   24,  74,  338,  1894, 12152,  87320, ...
  120, 394, 1962, 12194, 87320, 696076, ...
		

Crossrefs

Columns k=0..1 give A000142, A000774.
Main diagonal gives A382826.

Programs

  • PARI
    a(n, k) = sum(j=0, min(n, k), j!^2*abs(stirling(n+1, j+1, 1)*stirling(k+1, j+1, 1)));

Formula

E.g.f.: 1 / ( (1-x) * (1-y) * (1 - log(1-x) * log(1-y)) ).
A(n,k) = A(k,n).
A(n,k) = Sum_{j=0..min(n,k)} (j!)^2 * |Stirling1(n+1,j+1)| * |Stirling1(k+1,j+1)|.

A081049 Generalized Stirling numbers of the first kind.

Original entry on oeis.org

1, 0, 5, -5, 74, -154, 2484, -8028, 149904, -663696, 14257440, -80627040, 1965444480, -13575738240, 370643938560, -3031488633600, 91657072281600, -867718162483200, 28779361764249600, -309920046408806400, 11185850044938240000, -135153868608460800000
Offset: 0

Views

Author

Paul Barry, Mar 05 2003

Keywords

Crossrefs

Programs

  • Maple
    E:= 1/(1-x) - ln(1+x)/(1+x):
    S:= series(E,x,51):
    seq(coeff(S,x,n)*n!, n=0..50); # Robert Israel, Nov 23 2020

Formula

a(n) = n!*(1 + Sum {k=1..n, (-1)^n*1/k}).
E.g.f.: 1/(1-x) - log(1+x)/(1+x). - Robert Israel, Nov 23 2020
Showing 1-10 of 16 results. Next