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

A130679 a(n) = (n+1+(-1)^n)*A024167(n), related to alternating harmonic sums.

Original entry on oeis.org

1, 4, 15, 84, 470, 3552, 26796, 255840, 2435184, 28114560, 323405280, 4380445440, 59105255040, 918796677120, 14228252640000, 249644312064000, 4363865549568000, 85297521899520000, 1661265370695168000
Offset: 1

Views

Author

Paul Curtz, Jun 29 2007

Keywords

Comments

Inspired by a formula in the reference, the study of the singular points of planar differential systems leads to 3 two-dimensional polynomial families, one ordinary (degenerate case, considered in one dimension, see A129326) and two odd (the second, considered in one dimension, see A129587).
The first is in one dimension P(2n-1,x)=(n+1+x^n)*sum_{i=0..n-1} x^i/(i+1), n>=1.
The table of coefficients of P() with 2n coefficients per row starts:
2, 1;
3, 3/2, 1, 1/2;
4, 2, 4/3, 1, 1/2, 1/3;.. .
Rows multiplied by n!, the table becomes Q():
2, 1;
6, 3, 2, 1;
24, 12, 8, 6, 3, 2;
120, 60, 40, 30, 24, 12, 8, 6;
720, 360, 240, 180, 144,...
The sequence gives the alternating row sums of this table Q, positive sign for coefficients in front of even and negative sign for coefficients in front of odd powers of x.
The row sums of Q are (n+2)*A000254(n)= 3, 12, 55, 300...
Adding the alternating and ordinary row sums yields the sequence 4, 16, 70, 384....
The sequence of sums of antidiagonals in the Q table starts 2, 6+1=7, 24+3=27, 120+12+1=134.

Examples

			a(1) = 2-1.
a(2) = 6-3+2-1.
a(3) = 24-12+8-6+3-2.
		

Programs

  • Mathematica
    a[n_] := (1/2)*(n + (-1)^n + 1)*n!*((-1)^n*(HarmonicNumber[(n-1)/2] - HarmonicNumber[n/2]) + Log[4]); Table[a[n] // FullSimplify, {n, 1, 19}] (* Jean-François Alcover, Oct 03 2012 *)

Formula

a(n) = n!*(n+1+(-1)^n)*A058313(n)/A058312(n). - R. J. Mathar, Jul 28 2008

Extensions

Edited and extended by R. J. Mathar, Jul 28 2008

A177174 Quotients of A024167(4n+3) and 6n+5.

Original entry on oeis.org

1, 348, 1729440, 41241312000, 3015000672768000, 527687056666983628800, 188914713746113278443520000, 124045230509584729103440281600000, 137884921365250007970511444770816000000
Offset: 0

Views

Author

Jens Voß, May 04 2010

Keywords

Examples

			For n=2, A024167(4n+3) = A024167(11) = 11! * (1 - 1/2 +- ... + 1/11) = 29400480, so a(n) = 29400480/(6n+5) = 29400480/17 = 1729440
		

Crossrefs

A177188 Quotients of A024167(4n) and 6n+1.

Original entry on oeis.org

0, 2, 1968, 16467840, 554765137920, 52485654509568000, 11281219212469764096000, 4790353998374876546334720000, 3639616082290561423547931033600000
Offset: 0

Views

Author

Jens Voß, May 04 2010

Keywords

Examples

			For n=2, A024167(4n) = A024167(8) = 8! * (1 - 1/2 +- ... - 1/8) = 25584, so a(2) = 25584/(6n+1) = 25584/13 = 1968
		

Crossrefs

See A024167. Also see A177174.

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

A000629 Number of necklaces of partitions of n+1 labeled beads.

Original entry on oeis.org

1, 2, 6, 26, 150, 1082, 9366, 94586, 1091670, 14174522, 204495126, 3245265146, 56183135190, 1053716696762, 21282685940886, 460566381955706, 10631309363962710, 260741534058271802, 6771069326513690646, 185603174638656822266, 5355375592488768406230
Offset: 0

Views

Author

N. J. A. Sloane, Don Knuth, Nick Singer (nsinger(AT)eos.hitc.com)

Keywords

Comments

Also the number of logically distinct strings of first order quantifiers in which n variables occur (C. S. Peirce, c. 1903). - Stephen Pollard (spollard(AT)truman.edu), Jun 07 2002
Stirling transform of A052849(n) = [2, 4, 12, 48, 240, ...] is a(n) = [2, 6, 26, 150, 1082, ...]. - Michael Somos, Mar 04 2004
Stirling transform of A000142(n-1) = [1, 1, 2, 6, 24, ...] is a(n-1) = [1, 2, 6, 26, ...]. - Michael Somos, Mar 04 2004
Stirling transform of (-1)^n * A024167(n-1) = [0, 1, -1, 5, -14, 94, ...] is a(n-2) = [0, 1, 2, 6, 26, ...]. - Michael Somos, Mar 04 2004
The asymptotic expansion of 2*log(n) - (2^1*log(1) + 2^2*log(2) + ... + 2^n*log(n))/2^n is (a(1)/1)/n + (a(2)/2)/n^2 + (a(3)/3)/n^3 + ... - Michael Somos, Aug 22 2004
This is the sequence of cumulants of the probability distribution of the number of tails before the first head in a sequence of fair coin tosses. - Michael Hardy (hardy(AT)math.umn.edu), May 01 2005
Appears to be row sums of A154921. - Mats Granvik, Jan 18 2009
This is the number of cyclically ordered partitions of n+1 labeled points. The ordered version is A000670. - Michael Somos, Jan 08 2011
A000670(n+1) = p(n+1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n. - Michael Somos, Apr 27 2012
Row sums of A154921 as conjectured above by Granvik. a(n) gives the number of outcomes of a race between n horses H1,...,Hn, where if a horse falls it is not ranked. For example, when n = 2 the 6 outcomes are a dead heat, H1 wins H2 second, H2 wins H1 second, H1 wins H2 falls, H2 wins H1 falls or both fall. - Peter Bala, May 15 2012
Also the number of disjoint areas of a Venn diagram for n multisets. - Aurelian Radoaca, Jun 27 2016
Also the number of ways of ordering n nonnegative integers, allowing for the possibility of ties, and also comparing the smallest integers with 0. Each comparison with 0 gives two possibilities, x > 0 or x=0. As such, without comparison with 0, we get A000670, the number of ways of ordering n nonnegative integers, allowing for the possibility of ties, or the number of ways n competitors can rank in a competition, allowing for the possibility of ties. For instance, for 2 nonnegative integers x,y, there are the following 6 ways of ordering them: x = y = 0, x = y > 0, x > y = 0, x > y > 0, y > x = 0, y > x > 0. - Aurelian Radoaca, Jul 09 2016
Also the number of ordered set partitions of subsets of {1,...,n}. Also the number of chains of distinct nonempty subsets of {1,...,n}. - Gus Wiseman, Feb 01 2019
Number of combinations of a Simplex lock having n buttons.
Row sums of the unsigned cumulant expansion polynomials A127671 and logarithmic polynomials A263634. - Tom Copeland, Jun 04 2021
Also the number of vertices in the axis-aligned polytope consisting of all vectors x in R^n where, for all k in {1,...,n}, the k-th smallest coordinate of x lies in the interval [0, k]. - Adam P. Goucher, Jan 18 2023
Number of idempotent Boolean relation matrices whose complement is also idempotent. See Rosenblatt link. - Geoffrey Critzer, Feb 26 2023

Examples

			a(2)=6: the necklace representatives on 1,2,3 are ({123}), ({12},{3}), ({13},{2}), ({23},{1}), ({1},{2},{3}), ({1},{3},{2})
G.f. = 1 + 2*x + 6*x^2 + 26*x^3 + 150*x^4 + 1082*x^5 + 9366*x^6 + 94586*x^7 + ...
From _Gus Wiseman_, Feb 01 2019: (Start)
The a(3) = 26 ordered set partitions of subsets of {1,2,3} are:
  {}  {{1}}  {{2}}  {{3}}  {{12}}    {{13}}    {{23}}    {{123}}
                           {{1}{2}}  {{1}{3}}  {{2}{3}}  {{1}{23}}
                           {{2}{1}}  {{3}{1}}  {{3}{2}}  {{12}{3}}
                                                         {{13}{2}}
                                                         {{2}{13}}
                                                         {{23}{1}}
                                                         {{3}{12}}
                                                         {{1}{2}{3}}
                                                         {{1}{3}{2}}
                                                         {{2}{1}{3}}
                                                         {{2}{3}{1}}
                                                         {{3}{1}{2}}
                                                         {{3}{2}{1}}
(End)
		

References

  • R. Austin, R. K. Guy, and R. Nowakowski, unpublished notes, circa 1987.
  • N. G. de Bruijn, Asymptotic Methods in Analysis, Dover, 1981, p. 36.
  • Eric Hammer, The Calculations of Peirce's 4.453, Transactions of the Charles S. Peirce Society, Vol. 31 (1995), pp. 829-839.
  • D. E. Knuth, personal communication.
  • J. D. E. Konhauser et al., Which Way Did the Bicycle Go?, MAA 1996, p. 174.
  • Charles Sanders Peirce, Collected Papers, eds. C. Hartshorne and P. Weiss, Harvard University Press, Cambridge, Vol. 4, 1933, pp. 364-365. (CP 4.453 in the electronic edition of The Collected Papers of Charles Sanders Peirce.)
  • Dawidson Razafimahatolotra, Number of Preorders to Compute Probability of Conflict of an Unstable Effectivity Function, Preprint, Paris School of Economics, University of Paris I, Nov 23 2007.

Crossrefs

Same as A076726 except for a(0). Cf. A008965, A052861, A008277.
Binomial transform of A000670, also double of A000670. - Joe Keane (jgk(AT)jgk.org)
A002050(n) = a(n) - 1.
A000629, A000670, A002050, A052856, A076726 are all more-or-less the same sequence. - N. J. A. Sloane, Jul 04 2012
Row sums of A028246.
A diagonal of the triangular array in A241168.
Row sums of unsigned A127671 and A263634.

Programs

  • Maple
    spec := [ B, {B=Cycle(Set(Z,card>=1))}, labeled ]; [seq(combstruct[count](spec, size=n), n=0..20)];
    a:=n->add(Stirling2(n+1,k)*(k-1)!,k=1..n+1); # Mike Zabrocki, Feb 05 2005
  • Mathematica
    a[ 0 ] = 1; a[ n_ ] := (a[ n ] = 1 + Sum[ Binomial[ n, k ] a[ n-k ], {k, 1, n} ])
    Table[ PolyLog[n, 1/2], {n, 0, -18, -1}] (* Robert G. Wilson v, Aug 05 2010 *)
    a[ n_] := If[ n<0, 0, PolyLog[ -n, 1/2]]; (* Michael Somos, Mar 07 2011 *)
    Table[Sum[(-1)^(n-k) StirlingS2[n,k]k! 2^k,{k,0,n}],{n,0,20}] (* Harvey P. Dale, Oct 21 2011 *)
    Join[{1}, Rest[t=30; Range[0, t]! CoefficientList[Series[2/(2 - Exp[x]), {x, 0, t}], x]]] (* Vincenzo Librandi, Jan 02 2016 *)
  • PARI
    {a(n) = if( n<0, 0, n! * polcoeff(subst( (1 + y) / (1 - y), y, exp(x + x * O(x^n)) - 1), n))} /* Michael Somos, Mar 04 2004 */
    
  • PARI
    {a(n)=polcoeff(sum(m=0, n, 2^m*m!*x^m/prod(k=1, m, 1+k*x+x*O(x^n))), n)} \\ Paul D. Hanna, Jul 20 2011
    
  • Python
    from math import comb
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A000629(n): return 1+sum(comb(n,j)*A000629(j) for j in range(n)) if n else 1 # Chai Wah Wu, Sep 25 2023

Formula

a(n) = 2*A000670(n) - 0^n. - Michael Somos, Jan 08 2011
O.g.f.: Sum_{n>=0} 2^n*n!*x^n / Product_{k=0..n} (1+k*x). - Paul D. Hanna, Jul 20 2011
E.g.f.: exp(x) / (2 - exp(x)) = d/dx log(1 / (2 - exp(x))).
a(n) = Sum_{k>=1} k^n/2^k.
a(n) = 1 + Sum_{j=0..n-1} C(n, j)*a(j).
a(n) = round(n!/log(2)^(n+1)) (just for n <= 15). - Henry Bottomley, Jul 04 2000
a(n) is asymptotic to n!/log(2)^(n+1). - Benoit Cloitre, Oct 20 2002
a(n) = Sum_{k=0..n} (-1)^(n-k)*Stirling2(n, k)*k!*2^k. - Vladeta Jovovic, Sep 29 2003
a(n) = Sum_{k=1..n} A008292(n, k)*2^k; A008292: triangle of Eulerian numbers. - Philippe Deléham, Jun 05 2004
a(1) = 1, a(n) = 2*Sum_{k=1..n-1} k!*A008277(n-1, k) for n>1 or a(n) = Sum_{k=1..n} (k-1)!*A008277(n, k). - Mike Zabrocki, Feb 05 2005
a(n) = Sum_{k=0..n} Stirling2(n+1, k+1)*k!. - Paul Barry, Apr 20 2005
A000629 = binomial transform of this sequence. a(n) = sum of terms in n-th row of A028246. - Gary W. Adamson, May 30 2005
a(n) = 2*(-1)^n * n!*Laguerre(n,P((.),2)), umbrally, where P(j,t) are the polynomials in A131758. - Tom Copeland, Sep 28 2007
a(n) = 2^n*A(n,1/2); A(n,x) the Eulerian polynomials. - Peter Luschny, Aug 03 2010
a(n) = (-1)^n*b(n), where b(n) = -2*Sum_{k=0..n-1} binomial(n,k)*b(k), b(0)=1. - Vladimir Kruchinin, Jan 29 2011
Row sums of A028246. Let f(x) = x+x^2. Then a(n+1) = (f(x)*d/dx)^n f(x) evaluated at x = 1. - Peter Bala, Oct 06 2011
O.g.f.: 1+2*x/(U(0)-2*x) where U(k)=1+3*x+3*x*k-2*x*(k+2)*(1+x+x*k)/U(k+1); (continued fraction). - Sergei N. Gladkovskii, Nov 14 2011
E.g.f.: exp(x)/(2 - exp(x)) = 2/(2-Q(0))-1; Q(k)=1+x/(2*k+1-x*(2*k+1)/(x+(2*k+2)/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Nov 14 2011
G.f.: 1 / (1 - 2*x / (1 - 1*x / (1 - 4*x / (1 - 2*x / (1 - 6*x / ...))))). - Michael Somos, Apr 27 2012
PSUM transform of A162509. BINOMIAL transform is A007047. - Michael Somos, Apr 27 2012
G.f.: 1/G(0) where G(k) = 1 - x*(2*k+2)/( 1 - x*(k+1)/G(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Mar 23 2013
E.g.f.: 1/E(0) where E(k) = 1 - x/(k+1)/(1 - 1/(1 + 1/E(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Mar 27 2013
G.f.: T(0)/(1-2*x), where T(k) = 1 - 2*x^2*(k+1)^2/(2*x^2*(k+1)^2 - (1 - 2*x - 3*x*k)*(1 - 5*x - 3*x*k)/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Oct 29 2013
a(n) = log(2)*integral_{x>=0} (ceiling(x))^n * 2^(-x) dx. - Peter Bala, Feb 06 2015

Extensions

a(19) from Michael Somos, Mar 07 2011

A001819 Central factorial numbers: second right-hand column of triangle A008955.

Original entry on oeis.org

0, 1, 5, 49, 820, 21076, 773136, 38402064, 2483133696, 202759531776, 20407635072000, 2482492033152000, 359072203696128000, 60912644957448192000, 11977654199703478272000, 2702572249389834608640000
Offset: 0

Views

Author

Keywords

Comments

Coefficient of x^2 in Product_{k=0..n}(x + k^2). - Ralf Stephan, Aug 22 2004
p divides a(p-1) for prime p > 3. p divides a((p-1)/2) for prime p > 3. For prime p, p^2 divides a(n) for n > 2*p+1. - Alexander Adamchuk, Jul 11 2006; last comment corrected by Michel Marcus, May 20 2020
The ratio a(n)/A001044(n) is the partial sum of the reciprocals of squares. E.g., a(4)/A001044(4) = 820/576 = 1/1 + 1/4 + 1/9 + 1/16. - Pierre CAMI, Oct 30 2006
a(n) is the (n-1)-st elementary symmetric function of the squares of the first n numbers. - Anton Zakharov, Nov 06 2016
Primes p such that p^2 | a(p-1) are the Wolstenholme primes A088164. - Amiram Eldar and Thomas Ordowski, Aug 08 2019

References

  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 217.
  • 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

Second right-hand column of triangle A008955.
Equals row sums of A162990(n)/(n+1)^2 for n >= 1.

Programs

Formula

a_n = (n!)^2 * Sum_{k=1..n} 1/k^2. - Joe Keane (jgk(AT)jgk.org)
a(n) ~ (1/3)*Pi^3*n*e^(-2*n)*n^(2*n). - Joe Keane (jgk(AT)jgk.org), Jun 06 2002
Sum_{n>=0} a(n)*x^n/n!^2 = polylog(2, x)/(1-x). - Vladeta Jovovic, Jan 23 2003
a(n) = Sum_{i=1..n} 1/i^2 / Product_{i=1..n} 1/i^2. - Alexander Adamchuk, Jul 11 2006
a(0) = 0, a(n) = a(n-1)*n^2 + A001044(n-1). E.g., a(1) = 0*1 + 1 = 1 since A001044(0) = 1; a(2) = 1*2^2 + 1 = 5 since A001044(1) = 1; a(3) = 5*3^2 + 4 = 49 since A001044(2) = 4; and so on. - Pierre CAMI, Oct 30 2006
Recurrence: a(0) = 0, a(1) = 1, a(n+1) = (2*n^2 + 2*n + 1)*a(n) - n^4*a(n-1). The sequence b(n) = n!^2 satisfies the same recurrence with the initial conditions b(0) = 1, b(1) = 1. Hence we obtain the finite continued fraction expansion a(n)/b(n) = 1/(1 - 1^4/(5 - 2^4/(13 - 3^4/(25 - ... -(n-1)^4/((2*n^2 - 2*n + 1)))))), leading to the infinite continued fraction expansion zeta(2) = 1/(1-1^4/(5 - 2^4/(13 - 3^4/(25 - ... - n^4/((2*n^2 + 2*n + 1) - ...))))). Compare with A142995. Compare also with A024167 and A066989. - Peter Bala, Jul 18 2008
a(n)/(n!)^2 -> zeta(2) = A013661 as n -> infinity, rewriting the Keane formula. - Najam Haq (njmalhq(AT)yahoo.com), Jan 13 2010
a(n) = s(n+1,2)^2 - 2*s(n+1,1)*s(n+1,3), where s(n,k) are Stirling numbers of the first kind, A048994. - Mircea Merca, Apr 03 2012

Extensions

Minor edits by Vaclav Kotesovec, Jan 28 2015

A052882 A simple grammar: rooted ordered set partitions.

Original entry on oeis.org

0, 1, 2, 9, 52, 375, 3246, 32781, 378344, 4912515, 70872610, 1124723193, 19471590876, 365190378735, 7376016877334, 159620144556645, 3684531055645648, 90366129593683035, 2346673806524446218, 64325158601880061137, 1856031746386568222660, 56231443721132068265415
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Recurrence (see Mathematica line) is similar to that for Genocchi numbers A001469. - Wouter Meeussen, Jan 09 2001
Stirling transform of A024167(n) = [ 1, 1, 5, 14, 94, ...] is a(n) = [ 1, 2, 9, 52, 375, ...]. Stirling transform of a(n) = [ 0, 2, 9, 52, 375, ...] is A087301(n+1) = [ 0, 2, 3, 20, ...]. - Michael Somos, Mar 04 2004
Starting with offset 1 = the right border of triangle A208744. - Gary W. Adamson, Mar 05 2012
a(n) is the number of ordered set partitions of {1,2,...,n} such that the first block is a singleton. - Geoffrey Critzer, Jul 22 2013
Ramanujan gives a method of finding a continued fraction of the solution x of an equation 1 = x + a2*x^2 + ... and uses log(2) as the solution of 1 = x + x^2/2 + x^3/6 + ... as an example giving the sequence of simplified convergents as 0/1, 1/1, 2/3, 9/13, 52/75, 375/541, ... of which the sequence of numerators is this sequence while A000670 is the denominators. - Michael Somos, Jun 19 2015

Examples

			G.f. = x + 2*x^2 + 9*x^3 + 52*x^4 + 375*x^5 + 3246*x^6 + 32781*x^7 + ...
		

References

  • S. Ramanujan, Notebooks, Tata Institute of Fundamental Research, Bombay 1957 Vol. 1, see page 19.

Crossrefs

Programs

  • Maple
    spec := [S,{C=Sequence(B),B=Set(Z,1 <= card),S=Prod(Z,C)},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
    with(combinat): a:=n-> add(add(add((-1)^(k-i)*binomial(k, i)*i^(n-1), i=0..n-1), k=0..n-1), m=0..n-1): seq(a(n), n=0..20); # Zerinvary Lajos, Jun 03 2007
    # next Maple program:
    b:= proc(n, k) option remember;
         `if`(n<1, k!, k*b(n-1, k)+b(n-1, k+1))
        end:
    a:= n-> b(n-1, 0)*n:
    seq(a(n), n=0..25);  # Alois P. Heinz, Apr 15 2023
  • Mathematica
    a[1] := 1; a[n_] := a[n]=Sum[ Binomial[n, m] a[ n-m], {m, 1, n-1}]
    Range[0, 30]!* CoefficientList[Series[x/(2 - Exp[x]),{x, 0, 30}], x] (* Vincenzo Librandi, Dec 06 2012 *)
    a[ n_] := If[ n < 2, Boole[n == 1], n PolyLog[ 1 - n, 1/2] / 2]; (* Michael Somos, Jun 19 2015 *)
    a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ x / (2 - Exp@x), {x, 0, n}]]; (* Michael Somos, Jun 19 2015 *)
    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_] := n*Fubini[n-1, 1]; Table[ a[n], {n, 0, 18}] (* Jean-François Alcover, Mar 30 2016 *)
  • PARI
    {a(n) = if( n<0, 0, n! * polcoeff( subst( x / (1 - y), y, exp(x + x*O(x^n)) - 1), n))};
    
  • Python
    from math import factorial
    from sympy.functions.combinatorial.numbers import stirling
    def A052882(n): return n*sum(factorial(k)*stirling(n-1,k) for k in range(n)) # Chai Wah Wu, Apr 15 2023

Formula

E.g.f.: x / (2 - exp(x)).
a(n) = n * A000670(n-1) if n>0.
a(n) = (1/2)*sum(k=0, n-1, B_k*A000629(k)*binomial(n, k)) where B_k is the k-th Bernoulli number. - Benoit Cloitre, Oct 19 2005
a(n) ~ n!/(2*(log(2))^n). - Vaclav Kotesovec, Aug 09 2013
a(0) = 0, a(1) = 1; a(n) = n! * [x^n] exp(x)*Sum_{k=1..n-1} a(k)*x^k/k!. - Ilya Gutkovskiy, Oct 17 2017

A142979 a(1) = 1, a(2) = 3, a(n+2) = 3*a(n+1) + (n+1)^2*a(n).

Original entry on oeis.org

1, 3, 13, 66, 406, 2868, 23220, 210192, 2116656, 23375520, 281792160, 3673814400, 51599514240, 775673176320, 12440524320000, 211848037632000, 3820318338816000, 72685037892096000, 1455838255452672000
Offset: 1

Views

Author

Peter Bala, Jul 17 2008

Keywords

Comments

This is the case m = 1 of the more general recurrence a(1) = 1, a(2) = 2*m + 1, a(n+2) = (2*m + 1)*a(n+1) + (n + 1)^2*a(n) (we suppress the dependence of a(n) on m), which arises when accelerating the convergence of Mercator's series for the constant log(2). For other cases see A024167 (m = 0), A142980 (m = 2), A142981 (m = 3) and A142982 (m = 4).
The solution to the general recurrence may be expressed as a sum: a(n) = n!*p_m(n)*Sum_{k = 1..n} (-1)^(k+1)/(k*p_m(k-1)*p_m(k)), where p_m(x) = Sum_{k = 0..m} 2^k*C(m,k)*C(x,k) = Sum_{k = 0..m} C(m,k)*C(x+k,m), is the Ehrhart polynomial of the m-dimensional cross polytope (the hyperoctahedron).
The first few values are p_0(x) = 1, p_1(x) = 2*x + 1, p_2(x) = 2*x^2 + 2*x + 1 and p_3(x) = (4*x^3 + 6*x^2 + 8*x + 3)/3.
The sequence {p_m(k)},k>=0 is the crystal ball sequence for the product lattice A_1 x... x A_1 (m copies). The table of values [p_m(k)]m,k>=0 is the array of Delannoy numbers A008288.
The polynomial p_m(x) is the unique polynomial solution of the difference equation (x + 1)*f(x+1) - x*f(x-1) = (2*m + 1)*f(x), normalized so that f(0) = 1. These polynomials have their zeros on the vertical line Re x = -1/2 in the complex plane, that is, the polynomials p_m(x-1), m = 1,2,3,..., satisfy a Riemann hypothesis [BUMP et al., Theorems 4 and 6]. The o.g.f. for the p_m(x) is (1 + t)^x/(1 - t)^(x+1) = 1 + (2*x + 1)*t + (2*x^2 + 2*x + 1)*t^2 + ....
The general recurrence in the first paragraph above also has a second solution b(n) = n!*p_m(n) with initial conditions b(1) = 2*m + 1, b(2) = (2*m + 1)^2 + 1.
Hence the behavior of a(n) for large n is given by lim_{n -> oo} a(n)/b(n) = Sum_{k >= 1} (-1)^(k+1)/(k*p_m(k-1)*p_m(k)) = 1/((2*m + 1) + 1^2/((2*m + 1) + 2^2/((2*m + 1) + 3^2/((2*m + 1) + ... + n^2/((2*m + 1) + ...))))) = (-1)^m * (log(2) - (1 - 1/2 + 1/3 - ... + (-1)^(m+1)/m)), where the final equality follows by a result of Ramanujan (see [Berndt, Chapter 12, Entry 29]).
For other sequences defined by similar recurrences and related to log(2) see A142983 and A142988. See also A142992 for the connection between log(2) and the C_n lattices. For corresponding results for the constants e, zeta(2) and zeta(3) see A000522, A142995 and A143003 respectively.

References

  • Bruce C. Berndt, Ramanujan's Notebooks Part II, Springer-Verlag.

Crossrefs

Programs

  • Maple
    p := n -> 2*n+1: a := n -> n!*p(n)*sum ((-1)^(k+1)/(k*p(k-1)*p(k)), k = 1..n): seq(a(n), n = 1..20)
  • Mathematica
    RecurrenceTable[{a[1]==1,a[2]==3,a[n+2]==3a[n+1]+(n+1)^2 a[n]},a,{n,20}] (* Harvey P. Dale, May 20 2012 *)

Formula

a(n) = n!*p(n)*Sum_{k = 1..n} (-1)^(k+1)/(k*p(k-1)*p(k)), where p(n) = 2*n + 1.
Recurrence: a(1) = 1, a(2) = 3, a(n+2) = 3*a(n+1) + (n + 1)^2*a(n).
The sequence b(n):= n!*p(n) satisfies the same recurrence with b(1) = 3, b(2) = 10.
Hence we obtain the finite continued fraction expansion a(n)/b(n) = 1/(3 + 1^2/(3 + 2^2/(3 + 3^2/(3 + ... + (n-1)^2/3)))), for n >= 2.
Limit_{n -> oo} a(n)/b(n) = 1/(3 + 1^2/(3 + 2^2/(3 + 3^2/(3 + ... + (n-1)^2/(3 + ...))))) = Sum_{k >= 1} (-1)^(k+1)/(k*(4k^2 - 1)) = 1 - log(2).
Thus a(n) ~ c*n*n! as n -> oo, where c = 2*(1 - log(2)).
From Peter Bala, Dec 09 2024: (Start)
E.g.f.: A(x) = (2*x - (1 + x)*log(1 + x))/(1 - x)^2 satisfies the differential equation 1 + (x + 3)*A(x) + (x^2 - 1)*A'(x) = 0 with A(0) = 0.
Sum_{k = 1..n} Stirling_2(n, k) * a(k) = A317057(n+1). (End)

A024168 a(n) = n! * (1 + Sum_{j=1..n} (-1)^j/j).

Original entry on oeis.org

1, 0, 1, 1, 10, 26, 276, 1212, 14736, 92304, 1285920, 10516320, 166112640, 1680462720, 29753498880, 359124192000, 7053661440000, 98989454592000, 2137497610752000, 34210080898560000, 805846718380032000, 14489879077804032000, 369868281883398144000
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of permutations of n letters all cycles of which have length <= n/2, a quantity which arises in the solution to the One Hundred Prisoners problem. - Jim Ferry (jferry(AT)alum.mit.edu), Mar 29 2007

Crossrefs

A075829(n) = a(n-1)/gcd(a(n-1), a(n)).

Programs

  • Maple
    a := n -> n!*((-1)^n*LerchPhi(-1, 1, n + 1) + 1 - log(2));
    seq(simplify(a(n)), n=0..21); # Peter Luschny, Dec 27 2018
  • Mathematica
    f[k_] := (k + 1) (-1)^(k + 1)
    t[n_] := Table[f[k], {k, 1, n}]
    a[n_] := SymmetricPolynomial[n - 1, t[n]]
    Table[a[n], {n, 1, 22}]    (* A024168 signed *)
    (* Clark Kimberling, Dec 30 2011 *)
  • PARI
    x='x+O('x^33); concat([0],Vec(serlaplace((x-log(1+x))/(1-x)))) \\ Joerg Arndt, Dec 27 2018

Formula

From Michael Somos, Oct 29 2002: (Start)
E.g.f.: (log(x+1)-1)/(x-1).
a(n) = a(n-1)+a(n-2)*(n-1)^2, n>=2. (End)
a(0) = 1, a(n) = a(n-1)*n + (-1)^n*(n-1)!. - Daniel Suteu, Feb 06 2017
a(n) = n!*((-1)^n*LerchPhi(-1, 1, n+1) + 1 - log(2)). - Peter Luschny, Dec 27 2018
Limit_{n->oo} a(n)/n! = 1 - log(2) = A244009. - Alois P. Heinz, Jul 08 2022

Extensions

More terms from Michael Somos, Oct 29 2002
a(0)=1 prepended and edited by Alois P. Heinz, Sep 24 2023

A075829 Let u(1) = x and u(n+1) = (n^2/u(n)) + 1 for n >= 1; then a(n) is such that u(n) = (b(n)*x + c(n))/(d(n)*x + a(n)) (in lowest terms) and a(n), b(n), c(n), d(n) are positive integers.

Original entry on oeis.org

1, 0, 1, 1, 5, 13, 23, 101, 307, 641, 893, 7303, 9613, 97249, 122989, 19793, 48595, 681971, 818107, 13093585, 77107553, 66022193, 76603673, 1529091919, 1752184789, 7690078169, 8719737569, 23184641107, 3721854001, 96460418429
Offset: 1

Views

Author

Benoit Cloitre, Oct 14 2002

Keywords

Comments

For x real <> 1 - 1/log(2), Lim_{n -> infinity} abs(u(n) - n) = abs((x - 1)/(1 + (x - 1)*log(2))). [Corrected by Petros Hadjicostas, May 18 2020]
Difference between the denominator and the numerator of the (n-1)-th alternating harmonic number Sum_{k=1..n-1} (-1)^(k+1)*1/k = A058313(n-1)/A058312(n-1). - Alexander Adamchuk, Jul 22 2006
From Petros Hadjicostas, May 06 2020: (Start)
Inspired by Michael Somos's result below, we established the following formulas (valid for n >= 2). All the denominators in the first three formulas are equal to A334958(n).
b(n) = A024167(n)/gcd(A024167(n-1), A024167(n)).
c(n) = A024168(n)/gcd(A024168(n-1), A024168(n)).
d(n) = A024167(n-1)/gcd(A024167(n-1), A024167(n)).
b(n) + c(n) = n*(d(n) + a(n)).
u(n) = (A024167(n)*x + A024168(n))/(A024167(n-1)*x + A024168(n-1)). (End)

Crossrefs

Cf. A075827 (= b), A075828 (= c), A075830 (= d).

Programs

  • Mathematica
    Denominator[Table[Sum[(-1)^(k+1)*1/k,{k,1,n-1}],{n,1,30}]]-Numerator[Table[Sum[(-1)^(k+1)*1/k,{k,1,n-1}],{n,1,30}]] (* Alexander Adamchuk, Jul 22 2006 *)
  • PARI
    u(n) = if(n<2, x, (n-1)^2/u(n-1)+1);
    a(n) = polcoeff(denominator(u(n)), 0, x);

Formula

a(n) = A024168(n-1)/gcd(A024168(n-1), A024168(n)). - Michael Somos, Oct 29 2002
From Alexander Adamchuk, Jul 22 2006: (Start)
a(n) = A058312(n-1) - A058313(n-1) for n > 1 with a(1) = 1.
a(n) = denominator(Sum_{k=1..n-1} (-1)^(k+1)*1/k) - numerator(Sum_{k=1..n-1}(-1)^(k+1)*1/k). (End)

Extensions

Name edited by Petros Hadjicostas, May 06 2020
Showing 1-10 of 37 results. Next