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 18 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

A028338 Triangle of coefficients in expansion of (x+1)*(x+3)*...*(x + 2n - 1) in rising powers of x.

Original entry on oeis.org

1, 1, 1, 3, 4, 1, 15, 23, 9, 1, 105, 176, 86, 16, 1, 945, 1689, 950, 230, 25, 1, 10395, 19524, 12139, 3480, 505, 36, 1, 135135, 264207, 177331, 57379, 10045, 973, 49, 1, 2027025, 4098240, 2924172, 1038016, 208054, 24640, 1708, 64, 1, 34459425, 71697105, 53809164, 20570444, 4574934, 626934, 53676, 2796, 81, 1
Offset: 0

Views

Author

Keywords

Comments

Exponential Riordan array (1/sqrt(1-2*x), log(1/sqrt(1-2*x))). - Paul Barry, May 09 2011
The o.g.f.s D(d, x) of the column sequences, for d, d >= 0,(d=0 for the main diagonal) are P(d, x)/(1 - x)^(2*d+1), with the row polynomial P(d, x) = Sum_{m=0..d} A288875(d, m)*x^m. See A288875 for details. - Wolfdieter Lang, Jul 21 2017

Examples

			G.f. for n = 4: (x + 1)*(x + 3)*(x + 5)*(x + 7) = 105 + 176*x + 86*x^2 + 16*x^3 + x^4.
The triangle T(n, k) begins:
n\k       0        1        2        3       4      5     6    7  8  9
0:        1
1:        1        1
2:        3        4        1
3:       15       23        9        1
4:      105      176       86       16       1
5:      945     1689      950      230      25      1
6:    10395    19524    12139     3480     505     36     1
7:   135135   264207   177331    57379   10045    973    49    1
8:  2027025  4098240  2924172  1038016  208054  24640  1708   64  1
9: 34459425 71697105 53809164 20570444 4574934 626934 53676 2796 81  1
...
row n = 10: 654729075 1396704420 1094071221 444647600 107494190 16486680 1646778 106800 4335 100 1.
...  reformatted and extended. - _Wolfdieter Lang_, May 09 2017
O.g.f.s of diagonals d >= 0: D(2, x) = (3 + 8*x + x^2)/(1 - x)^5 generating [3, 23, 86, ...] = A024196(n+1), from the row d=2 entries of A288875 [3, 8, 1]. - _Wolfdieter Lang_, Jul 21 2017
Boas-Buck recurrence for column k=2 and n=4: T(4, 2) = (4!/2)*(2*(1+4*(5/12))*T(2,2)/2! + 1*(1 + 4*(1/2))*T(3,2)/3!) = (4!/2)*(8/3*1 + 3*9/3!) = 86. - _Wolfdieter Lang_, Aug 11 2017
		

Crossrefs

A039757 is signed version.
Row sums: A000165.
Diagonals: A000012, A000290(n+1), A024196(n+1), A024197(n+1), A024198(n+1).
A161198 is a scaled triangle version and A109692 is a transposed triangle version.
Central terms: A293318.
Cf. A286718, A002208(n+1)/A002209(n+1).

Programs

  • Maple
    nmax:=8; for n from 0 to nmax do a(n, 0) := doublefactorial(2*n-1) od: for n from 0 to nmax do a(n, n) := 1 od: for n from 2 to nmax do for m from 1 to n-1 do a(n, m) := (2*n-1)*a(n-1, m) + a(n-1, m-1) od; od: seq(seq(a(n, m), m=0..n), n=0..nmax); # Johannes W. Meijer, Jun 08 2009, revised Nov 25 2012
  • Mathematica
    T[n_, k_] := Sum[(-2)^(n-i) Binomial[i, k] StirlingS1[n, i], {i, k, n}] (* Woodhouse *)
    Join[{1},Flatten[Table[CoefficientList[Expand[Times@@Table[x+i,{i,1,2n+1,2}]],x],{n,0,10}]]] (* Harvey P. Dale, Jan 29 2013 *)

Formula

Triangle T(n, k), read by rows, given by [1, 2, 3, 4, 5, 6, 7, ...] DELTA [1, 0, 1, 0, 1, 0, 1, 0, ...] where DELTA is the operator defined in A084938. - Philippe Deléham, Feb 20 2005
T(n, k) = Sum_{i=k..n} (-2)^(n-i) * binomial(i, k) * s(n, i) where s(n, k) are signed Stirling numbers of the first kind. - Francis Woodhouse (fwoodhouse(AT)gmail.com), Nov 18 2005
G.f. of row polynomials in y: 1/(1-(x+x*y)/(1-2*x/(1-(3*x+x*y)/(1-4*x/(1-(5*x+x*y)/(1-6*x*y/(1-... (continued fraction). - Paul Barry, Feb 07 2009
T(n, m) = (2*n-1)*T(n-1,m) + T(n-1,m-1) with T(n, 0) = (2*n-1)!! and T(n, n) = 1. - Johannes W. Meijer, Jun 08 2009
From Wolfdieter Lang, May 09 2017: (Start)
E.g.f. of row polynomials in y: (1/sqrt(1-2*x))*exp(-y*log(sqrt(1-2*x))) = exp(-(1+y)*log(sqrt(1-2*x))) = 1/sqrt(1-2*x)^(1+y).
E.g.f. of column m sequence: (1/sqrt(1-2*x))* (-log(sqrt(1-2*x)))^m/m!. For the special Sheffer, also known as exponential Riordan array, see a comment above. (End)
Boas-Buck type recurrence for column sequence k: T(n, k) = (n!/(n - k)) * Sum_{p=k..n-1} 2^(n-1-p)*(1 + 2*k*beta(n-1-p))*T(p, k)/p!, for n > k >= 0, with input T(k, k) = 1, and beta(k) = A002208(k+1)/A002209(k+1). See a comment and references in A286718. - Wolfdieter Lang, Aug 09 2017

A161198 Triangle of polynomial coefficients related to the series expansions of (1-x)^((-1-2*n)/2).

Original entry on oeis.org

1, 1, 2, 3, 8, 4, 15, 46, 36, 8, 105, 352, 344, 128, 16, 945, 3378, 3800, 1840, 400, 32, 10395, 39048, 48556, 27840, 8080, 1152, 64, 135135, 528414, 709324, 459032, 160720, 31136, 3136, 128
Offset: 0

Views

Author

Johannes W. Meijer, Jun 08 2009, Jul 22 2011

Keywords

Comments

The series expansion of (1-x)^((-1-2*n)/2) = sum(b(p)*x^p, p=0..infinity) for n = 0, 1, 2, .. can be described with b(p) = (F(p,n)/ (2*n-1)!!)*(binomial(2*p,p)/4^(p)) with F(x,n) = 2^n * product( x+(2*k-1)/2, k=1..n). The roots of the F(x,n) polynomials can be found at p = (1-2*k)/2 with k from 1 to n for n = 0, 1, 2, .. . The coefficients of the F(x,n) polynomials lead to the triangle given above. The triangle row sums lead to A001147.
Quite surprisingly we discovered that sum(b(p)*x^p, p=0..infinity) = (1-x)^(-1-2*n)/2, for n = -1, -2, .. . We assume that if m = n+1 then the value returned for product(f(k), k = m..n) is 1 and if m> n+1 then 1/product(f(k), k=n+1..m-1) is the value returned. Furthermore (1-2*n)!! = (-1)^(n+1)/(2*n-3)!! for n = 1, 2, 3 .. . This leads to b(p) = ((-1-2*n)!!/ G(p,n))*(binomial(2*p,p) /4^(p)) for n = -1, -2, .. . For the G(p,n) polynomials we found that G(p,n) = F(-p,-n). The roots of the G(p,n) polynomials can be found at p=(2*k-1)/2 with k from 1 to (-n) for n = -1, -2, .. . The coefficients of the G(p,n) polynomials lead to a second triangle that stands with its head on top of the first one. It is remarkable that the row sums lead once again to A001147.
These two triangles together look like an hourglass so we propose to call the F(p,n) and the G(p,n) polynomials the hourglass polynomials.
Triangle T(n,k), read by rows, given by (1, 2, 3, 4, 5, 6, 7, 8, 9, ...) DELTA (2, 0, 2, 0, 2, 0, 2, 0, 2, ...) where DELTA is the operator defined in A084938. Philippe Deléham, May 14 2015.

Examples

			From _Gary W. Adamson_, Jul 19 2011: (Start)
The first few rows of matrix M are:
  1, 2,  0,  0, 0, ...
  1, 3,  2,  0, 0, ...
  1, 4,  5,  2, 0, ...
  1, 5,  9,  7, 2, ...
  1, 6, 14, 16, 9, ... (End)
The first few G(p,n) polynomials are:
  G(p,-3) = 15 - 46*p + 36*p^2 - 8*p^3
  G(p,-2) = 3 - 8*p + 4*p^2
  G(p,-1) = 1 - 2*p
The first few F(p,n) polynomials are:
  F(p,0) = 1
  F(p,1) = 1 + 2*p
  F(p,2) = 3 + 8*p + 4*p^2
  F(p,3) = 15 + 46*p + 36*p^2 + 8*p^3
The first few rows of the upper and lower hourglass triangles are:
  [15, -46, 36, -8]
  [3, -8, 4]
  [1, -2]
  [1]
  [1, 2]
  [3, 8, 4]
  [15, 46, 36, 8]
		

Crossrefs

Cf. A001790 [(1-x)^(-1/2)], A001803 [(1-x)^(-3/2)], A161199 [(1-x)^(-5/2)] and A161201 [(1-x)^(-7/2)].
Cf. A002596 [(1-x)^(1/2)], A161200 [(1-x)^(3/2)] and A161202 [(1-x)^(5/2)].
A046161 gives the denominators of the series expansions of all (1-x)^((-1-2*n)/2).
A028338 is a scaled triangle version, A039757 is a scaled signed triangle version and A109692 is a transposed scaled triangle version.
A001147 is the first left hand column and equals the row sums.
A004041 is the second left hand column divided by 2, A028339 is the third left hand column divided by 4, A028340 is the fourth left hand column divided by 8, A028341 is the fifth left hand column divided by 16.
A000012, A000290, A024196, A024197 and A024198 are the first (n-m=0), second (n-m=1), third (n-m=2), fourth (n-m=3) and fifth (n-m=4) right hand columns divided by 2^m.
A074599 * A025549 is not always equals the second left hand column.
Cf. A029635. [Gary W. Adamson, Jul 19 2011]

Programs

  • Maple
    nmax:=7; for n from 0 to nmax do a(n,n):=2^n: a(n,0):=doublefactorial(2*n-1) od: for n from 2 to nmax do for m from 1 to n-1 do a(n,m) := 2*a(n-1,m-1)+(2*n-1)*a(n-1,m) od: od: seq(seq(a(n,k), k=0..n), n=0..nmax);
    nmax:=7: M := Matrix(1..nmax+1,1..nmax+1): A029635 := proc(n,k): binomial(n,k) + binomial(n-1,k-1) end: for i from 1 to nmax do for j from 1 to i+1 do M[i,j] := A029635(i,j-1) od: od: for n from 0 to nmax do B := M^n: for m from 0 to n do a(n,m):= B[1,m+1] od: od: seq(seq(a(n,m), m=0..n), n=0..nmax);
    A161198 := proc(n,k) option remember; if k > n or k < 0 then 0 elif n = 0 and k = 0 then 1 else 2*A161198(n-1, k-1) + (2*n-1)*A161198(n-1, k) fi end:
    seq(print(seq(A161198(n,k), k = 0..n)), n = 0..6);  # Peter Luschny, May 09 2013
  • Mathematica
    nmax = 7; a[n_, 0] := (2*n-1)!!; a[n_, n_] := 2^n; a[n_, m_] := a[n, m] = 2*a[n-1, m-1]+(2*n-1)*a[n-1, m]; Table[a[n, m], {n, 0, nmax}, {m, 0, n}] // Flatten (* Jean-François Alcover, Feb 25 2014, after Maple *)
  • PARI
    for(n=0,9, print(Vec(Ser( 2^n*prod( k=1,n, x+(2*k-1)/2 ),,n+1))))  \\ M. F. Hasler, Jul 23 2011
    
  • Sage
    @CachedFunction
    def A161198(n,k):
        if k > n or k < 0 : return 0
        if n == 0 and k == 0: return 1
        return 2*A161198(n-1,k-1)+(2*n-1)*A161198(n-1,k)
    for n in (0..6): [A161198(n,k) for k in (0..n)]  # Peter Luschny, May 09 2013

Formula

a(n,m) := coeff(2^(n)*product((x+(2*k-1)/2),k=1..n), x, m) for n = 0, 1, .. ; m = 0, 1, .. .
a(n, m) = 2*a(n-1,m-1)+(2*n-1)*a(n-1,m) with a(n, n) = 2^n and a(n, 0) = (2*n-1)!!.
a(n,m) = the (m+1)-th term in the top row of M^n, where M is an infinite square production matrix; M[i,j] = A029635(i,j-1) = binomial(i, j-1) + binomial(i-1, j-2) with A029635 the (1.2)-Pascal triangle, see the examples and second Maple program. [Gary W. Adamson, Jul 19 2011]
T(n,k) = 2^k * A028338(n,k). - Philippe Deléham, May 14 2015

A024199 a(n) = (2n-1)!! * Sum_{k=0..n-1}(-1)^k/(2k+1).

Original entry on oeis.org

0, 1, 2, 13, 76, 789, 7734, 110937, 1528920, 28018665, 497895210, 11110528485, 241792844580, 6361055257725, 163842638377950, 4964894559637425, 147721447995130800, 5066706567801827025, 171002070002301095250, 6548719685561840296125, 247199273204273879989500
Offset: 0

Views

Author

Keywords

Comments

(2*n + 1)!!/a(n+1), n>=0, is the n-th approximant for William Brouncker's continued fraction for 4/Pi = 1 + 1^2/(2 + 3^2/(2 + 5^2/(2 + ... ))) See the C. Brezinski and J.-P. Delahaye references given under A142969 and A142970, respectively. The double factorials (2*n + 1)!! = A001147(n+1) enter. - Wolfdieter Lang, Oct 06 2008

Examples

			a(3) = (2*3 - 1)!! * Sum_{k=0..2} (-1)^k/(2k + 1) = 5!! * (1/(2*0 + 1) - 1/(2*1 + 1) + 1/(2*2 + 1)) = 5*3*1*(1/1 - 1/3 + 1/5) = 15 - 5 + 3 = 13. Notice that the first factor always cancels the common denominator of the sum. - _Michael B. Porter_, Jul 22 2016
		

References

  • A. E. Jolliffe, Continued Fractions, in Encyclopaedia Britannica, 11th ed., pp. 30-33; see p. 31.

Crossrefs

From Johannes W. Meijer, Nov 12 2009: (Start)
Cf. A007509 and A025547.
Equals first column of A167584.
Equals row sums of A167591.
Equals first right hand column of A167594.
(End)
Cf. A167576 and A135457.

Programs

  • Magma
    [0] cat [ n le 2 select (n) else 2*Self(n-1)+(2*n-3)^2*Self(n-2): n in [1..25] ]; // Vincenzo Librandi, Feb 17 2015
  • Maple
    a := proc(n) option remember; if n=0 then 0 elif n=1 then 1 else 2*a(n-1)+(2*n-3)^2* a(n-2) fi end: seq(a(n), n=0..20); # Peter Luschny, Nov 16 2016 after N. J. A. Sloane
  • Mathematica
    f[k_] := (2 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}]    (* A024199 signed *)
    (* Clark Kimberling, Dec 30 2011 *)
    RecurrenceTable[{a[n+1] == 2*a[n] + (2*n-1)^2*a[n-1],a[0] == 0, a[1] == 1},a,{n,0,20}] (* Vaclav Kotesovec, Mar 18 2014 *)
    CoefficientList[Series[Pi/4/Sqrt[1-2*x] - 1/2*Log[2*x+Sqrt[4*x^2-1]]/Sqrt[2*x-1], {x, 0, 20}], x] * Range[0, 20]! (* Vaclav Kotesovec, Mar 18 2014 *)

Formula

a(n) = s(1)s(2)...s(n)(1/s(1) - 1/s(2) + ... + c/s(n)) where c=(-1)^(n+1) and s(k) = 2k-1 for k = 1, 2, 3, ... (was previous definition). - Clark Kimberling
D-finite with recurrence a(0) = 0, a(1) = 1, a(n+1) = 2*a(n) + (2*n-1)^2*a(n-1). - N. J. A. Sloane, Jul 19 2002
a(n) + A024200(n) = A001147(n) = (2n-1)!!. - Max Alekseyev, Sep 23 2007
a(n)/A024200(n) -> Pi/(4-Pi) as n -> oo. - Max Alekseyev, Sep 23 2007
From Wolfdieter Lang, Oct 06 2008: (Start)
E.g.f. for a(n+1), n>=0: (sqrt(1-2*x)+arcsin(2*x)*sqrt(1+2*x)/2)/((1-4*x^2)^(1/2)*(1-2*x)). From the recurrence, solving (1-4*x^2)y''(x)-2*(8*x+1)*y'(x)-9*y=0 with inputs y(0)=1, y'(0)=2.
a(n+1) = A003148(n) + A143165(n), n>=0 (from the two terms of the e.g.f.). (End)
From Johannes W. Meijer, Nov 12 2009: (Start)
a(n) = (-1)^(n-1)*(2*n-3)!! + (2*n-1)*a(n-1) with a(0) = 0.
a(n) = (2*n-1)!!*sum((-1)^(k)/(2*k+1), k=0..n-1)
(End)
E.g.f.: Pi/4/sqrt(1-2*x) - 1/2*log(2*x+sqrt(4*x^2-1))/sqrt(2*x-1). - Vaclav Kotesovec, Mar 18 2014
a(n) ~ Pi * 2^(n-3/2) * n^n / exp(n). - Vaclav Kotesovec, Mar 18 2014
a(n) = (2*H(n+1/2)-Gamma(n+1/2))*2^(n-2)*sqrt(Pi) with H(x) the Hadamard factorial (see the link section). - Cyril Damamme, Jul 19 2015
a(n) = A135457(n) - (-1)^n A001147(n-1). - Cyril Damamme, Jul 19 2015
a(n) = (Pi + (-1)^n*(Psi(n/2 + 1/4) - Psi(n/2 + 3/4)))*Gamma(n+1/2)*2^(n-2)/sqrt(Pi). - Robert Israel, Jul 20 2015
a(n) = A167576(n) - A135457(n). - Cyril Damamme, Jul 22 2015
a(n)/A001147(n) -> Pi/4 as n -> oo. - Daniel Suteu, Jul 21 2016
From Peter Bala, Nov 15 2016: (Start)
Conjecture: a(n) = 1/2*Sum_{k = 0..2*n-1} (-1)^(n-k+1)*k!*(2*n - 2*k - 3)!!, where the double factorial of an odd integer (positive or negative) may be defined in terms of the gamma function as (2*N - 1)!! = 2^((N+1)/2)*Gamma(N/2 + 1)/sqrt(Pi).
E.g.f. 1/2*arcsin(2*x)/sqrt(1 - 2*x) = x + 2*x^2/2! + 13*x^3/3! + 76*x^4/4! + .... (End)

Extensions

Edited by N. J. A. Sloane, Jul 19 2002
New name from Cyril Damamme, Jul 19 2015

A109692 Triangle of coefficients in expansion of (1+x)*(1+3x)*(1+5x)*(1+7x)*...*(1+(2n-1)x).

Original entry on oeis.org

1, 1, 1, 1, 4, 3, 1, 9, 23, 15, 1, 16, 86, 176, 105, 1, 25, 230, 950, 1689, 945, 1, 36, 505, 3480, 12139, 19524, 10395, 1, 49, 973, 10045, 57379, 177331, 264207, 135135, 1, 64, 1708, 24640, 208054, 1038016, 2924172, 4098240, 2027025
Offset: 0

Views

Author

Philippe Deléham, Aug 08 2005

Keywords

Comments

Triangle T(n,k), 0 <= k <= n, read by rows, given by [1, 0, 1, 0, 1, 0, 1, 0, 1, ...] DELTA [1, 2, 3, 4, 5, 6, 7, 8, 9, ...] where DELTA is the operator defined in A084938.
T(n,k), 0 <= k <= n, is the number of elements in the Coxeter group B_n with absolute length k. - Jose Bastidas, Jul 14 2023

Examples

			Triangle T(n,k) begins:
  1;
  1,  1;
  1,  4,   3;
  1,  9,  23,   15;
  1, 16,  86,  176,   105;
  1, 25, 230,  950,  1689,   945;
  1, 36, 505, 3480, 12139, 19524, 10395;
  ...
		

Crossrefs

Cf. A039758 (signed version). A028338 transposed.
Row sums: A000165.
Central terms: A293318.
Cf. A161198 (transposed scaled triangle version).

Programs

  • Maple
    nmax:=8; mmax:=nmax: for n from 0 to nmax do a(n, n) := doublefactorial(2*n-1) od: for n from 0 to nmax do a(n, 0):=1 od: for n from 2 to nmax do for m from 1 to n-1 do a(n, m) := a(n-1,m) + (2*n-1)*a(n-1,m-1) od; od: seq(seq(a(n, m), m=0..n), n=0..nmax); # Johannes W. Meijer, Jun 08 2009, revised Nov 25 2012

Formula

T(n,m) = T(n-1,m) + (2*n-1)*T(n-1,m-1) with T(n,n) = (2*n-1)!! and T(n,0) = 1. - Johannes W. Meijer, Jun 08 2009

A002428 Numerators of coefficients of expansion of arctan(x)^2 = x^2 - 2/3*x^4 + 23/45*x^6 - 44/105*x^8 + 563/1575*x^10 - 3254/10395*x^12 + ...

Original entry on oeis.org

0, 1, -2, 23, -44, 563, -3254, 88069, -11384, 1593269, -15518938, 31730711, -186088972, 3788707301, -5776016314, 340028535787, -667903294192, 10823198495797, -5476065119726, 409741429887649, -103505656241356, 17141894231615609
Offset: 1

Views

Author

Keywords

Comments

|a(n)| = numerator of Sum_{k=1..n} 1/(n*(2*k-1)).
Let f(x) = (1/2)*log((1+sqrt(x))/(1-sqrt(x))) and c(n) = Integral_{x=0..1} f(x)*x^(n-1) dx, then for n>=1, c(n) = |a(n+1)|/A071968(n) and (f(x))^2 = Sum_{n>=1} c(n)*x^n. - Groux Roland, Dec 14 2010

References

  • A. Fletcher, J. C. P. Miller, L. Rosenhead and L. J. Comrie, An Index of Mathematical Tables. Vols. 1 and 2, 2nd ed., Blackwell, Oxford and Addison-Wesley, Reading, MA, 1962, Vol. 1, p. 89.
  • H. A. Rothe, in C. F. Hindenburg, editor, Sammlung Combinatorisch-Analytischer Abhandlungen, Vol. 2, Chap. XI. Fleischer, Leipzig, 1800, p. 313.
  • 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

  • GAP
    List([1..30], n-> NumeratorRat( (-1)^n*Sum([1..n-1], k-> 1/((n-1)*(2*k-1))) )) # G. C. Greubel, Jul 03 2019
  • Magma
    [0] cat [Numerator((-1)^n*(&+[1/((n-1)*(2*k-1)): k in [1..n-1]])): n in [2..30]]; // G. C. Greubel, Jul 03 2019
    
  • Mathematica
    a[n_]:= (-1)^n*Sum[1/((n-1)*(2*k-1)), {k,1,n-1}]//Numerator; Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Nov 04 2013 *)
    a[n_]:= SeriesCoefficient[ArcTan[x]^2, {x, 0, 2*n-2}]//Numerator; Table[a[n], {n, 1, 30}] (* G. C. Greubel, Jul 03 2019 *)
  • PARI
    vector(30, n, numerator((-1)^n*sum(k=1,n-1,1/((n-1)*(2*k-1))))) /* corrected by G. C. Greubel, Jul 03 2019 */
    
  • Sage
    [numerator((-1)^n*sum(1/((n-1)*(2*k-1)) for k in (1..n-1))) for n in (1..30)] # G. C. Greubel, Jul 03 2019
    

Formula

a(n) = numerator of (-1)^n * Sum_{k=1..n-1} 1/((n-1)*(2*k-1)), for n>=1. - G. C. Greubel, Jul 03 2019

Extensions

More terms from Jason Earls, Apr 09 2002
Additional comments from Benoit Cloitre, Apr 06 2002

A028341 Coefficient of x^4 in expansion of (x+1)*(x+3)*...*(x+2*n-1).

Original entry on oeis.org

1, 25, 505, 10045, 208054, 4574934, 107494190, 2702025590, 72578259391, 2078757113719, 63324503917311, 2046225352864875, 69953125893139644, 2523698606200763196, 95853765344939263692, 3824294822931302783964, 159940198124792648875341, 6998152417792503243516261
Offset: 4

Views

Author

Keywords

Comments

Equals fifth left hand column of A161198 triangle divided by 16. - Johannes W. Meijer, Jun 08 2009

Examples

			G.f. = x^4 + 25*x^5 + 505*x^6 + 10045*x^7 + 208054*x^8 + 4574934*x^9 + ...
		

Crossrefs

Programs

  • Maple
    N:= 50: # to get a(4) to a(N)
    P[0]:= 1;
    for n from 1 to N do
      P[n]:= rem(P[n-1]*(x + 2*n-1), x^5,x)
    od:
    seq(coeff(P[n],x,4),n=4..N); # Robert Israel, Nov 13 2014
  • Mathematica
    Table[Coefficient[Product[x + 2*k - 1, {k, 1, n}], x, 4], {n,4,50}] (* G. C. Greubel, Nov 24 2016 *)
  • PARI
    a(n) = polcoeff(prod(k=1, n, x+2*k-1), 4); \\ Michel Marcus, Nov 12 2014

Formula

a(n) = Sum_{i=k+1,..,n} (-1)^(k+1-i)*2^(n-1)*binomial(i-1, k)*s1(n, i) with k = 4, where s1(n, i) are unsigned Stirling numbers of the first kind. - Victor Adamchik (adamchik(AT)ux10.sp.cs.cmu.edu), Jan 23 2001
E.g.f.: (log(1-2*x))^4/( 384*sqrt(1-2*x) ). - Vladeta Jovovic, Feb 19 2003

Extensions

More terms from Michel Marcus, Nov 12 2014

A049034 Scaled sums of odd reciprocals.

Original entry on oeis.org

1, 8, 184, 8448, 648576, 74972160, 12174658560, 2643856588800, 740051782041600, 259500083163955200, 111422936937037824000, 57504006817918746624000, 35122852492484487413760000
Offset: 0

Views

Author

Joe Keane (jgk(AT)jgk.org)

Keywords

Comments

a(n) mod n^2 = 2*n if n is an odd prime, otherwise 0. - Gary Detlefs, Apr 16 2012

Examples

			(arctanh x)^2 = x^2 + 2/3*x^4 + 23/45*x^6 + 44/105*x^8 + ...
		

Crossrefs

Bisection of A081358 and A092692: a(n) = A081358(2n+1) = A092692(2n+1).

Programs

  • Mathematica
    Module[{nn=25,c},c=Range[1,nn,2];Times@@@Thread[{Accumulate[1/c],c!}]](* Harvey P. Dale, Nov 20 2013 *)
  • PARI
    {a(n)=if(n<0, 0, n=2*n+1; n!*sum(k=1, n, (k%2)/k))} /* Michael Somos, Sep 19 2006 */

Formula

a(n) = (2*n+1)! * sum[ k=0..n ] 1/(2*k+1).
E.g.f. (arctanh x)^2/2 = sum_n a(n)x^(2n+2)/(2n+2)! or (arctanh x)/(1-x^2) = sum_n a(n)x^(2n+1)/(2n+1)!.

A135876 Square array, read by antidiagonals, where row n+1 is generated from row n by first removing terms at positions [(m+2)^2/4 - 1] for m>=0 and then taking partial sums, starting with all 1's in row 0.

Original entry on oeis.org

1, 1, 1, 3, 2, 1, 15, 8, 3, 1, 105, 48, 15, 4, 1, 945, 384, 105, 23, 5, 1, 10395, 3840, 945, 176, 33, 6, 1, 135135, 46080, 10395, 1689, 279, 44, 7, 1, 2027025, 645120, 135135, 19524, 2895, 400, 57, 8, 1, 34459425, 10321920, 2027025, 264207, 35685, 4384, 561
Offset: 0

Views

Author

Paul D. Hanna, Dec 14 2007

Keywords

Comments

This is the double factorial analog of Moessner's factorial array (A125714). Compare to triangle A135877 which is generated by a complementary process. A very interesting variant is square array A135878.

Examples

			Square array begins:
(1),(1),1,(1),1,(1),1,1,(1),1,1,(1),1,1,1,(1),1,1,1,(1),1,1,1,1,(1),...;
(1),(2),3,(4),5,(6),7,8,(9),10,11,(12),13,14,15,(16),17,18,19,(20),...;
(3),(8),15,(23),33,(44),57,71,(86),103,121,(140),161,183,206,(230),..;
(15),(48),105,(176),279,(400),561,744,(950),1206,1489,(1800),2171,..;
(105),(384),945,(1689),2895,(4384),6555,9129,(12139),16161,20763,..;
(945),(3840),10395,(19524),35685,(56448),89055,129072,(177331),245778,...;
(10395),(46080),135135,(264207),509985,(836352),1381905,2071215,(2924172),.;
(135135),(645120),2027025,(4098240),8294895,(14026752),24137505,...; ...
where terms in parenthesis are removed before taking partial sums.
For example, to generate row 2 from row 1, remove terms at positions
{[(m+2)^2/4-1], m>=0} = [0,1,3,5,8,11,15,19,24,29,35,...] to obtain:
[3, 5, 7,8, 10,11, 13,14,15, 17,18,19, 21,22,23,24, 25,26,27,28, ...]
then take partial sums to get row 2:
[3, 8, 15,23, 33,44, 57,71,86, 103,121,140, 161,183,206,230, ...].
Repeating this process will generate all the rows of the triangle,
where column 0 will be the odd double factorials (A001147)
and column 1 will be the even double factorials (A000165).
		

Crossrefs

Cf. columns: A001147, A000165, A004041, A129890; variants: A135878, A125714.

Programs

  • PARI
    {T(n, k)=local(A=0, b=0, c=0, d=0); if(n==0, A=1, until(d>k, if(c==floor((b+2)^2/4)-1, b+=1, A+=T(n-1, c); d+=1); c+=1)); A}

Formula

T(n,0) = (2n)!/n!/2^n; T(n,1) = 2^n*n!; T(n,2) = (2n+1)!/n!/2^n; T(n,3) = A004041(n) = (2n+1)!/n!/2^n * Sum_{k=0..n} 1/(2k+1). T(n,4) = A129890(n) = 2^(n+1)*(n+1)! - (2n+1)!/n!/2^n = T(n+1,1)-T(n+1,0).

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

Original entry on oeis.org

0, 1, 8, 71, 744, 9129, 129072, 2071215, 37237680, 741975345, 16236211320, 387182170935, 9995788416600, 277792140828825, 8269430130712800, 262542617405726175, 8855805158351474400, 316285840413064454625, 11924219190760084593000, 473245342972281190686375, 19722890048636406588957000
Offset: 0

Views

Author

Seiichi Manyama, Sep 10 2020

Keywords

Examples

			a(1) = 3 * (1/3) = 1.
a(2) = 3*5 * (1/3 + 1/5) = 8.
a(3) = 3*5*7 * (1/3 +1/5 + 1/7) = 71.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := (2*n + 1)!! * Sum[1/(2*k + 1), {k, 1, n}]; Array[a, 21, 0] (* Amiram Eldar, Apr 29 2021 *)
  • PARI
    {a(n) = prod(k=1, n, 2*k+1)*sum(k=1, n, 1/(2*k+1))}
    
  • PARI
    {a(n) = if(n<2, n, 4*n*a(n-1)-(2*n-1)^2*a(n-2))}

Formula

a(n) + A001147(n+1) = A004041(n).
a(n) = (2*n+1) * a(n-1) + A001147(n) for n>0.
P-finite with recurrence a(n) = 4*n*a(n-1) - (2*n-1)^2 * a(n-2) for n>1.
Showing 1-10 of 18 results. Next