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-6 of 6 results.

A006882 Double factorials n!!: a(n) = n*a(n-2) for n > 1, a(0) = a(1) = 1.

Original entry on oeis.org

1, 1, 2, 3, 8, 15, 48, 105, 384, 945, 3840, 10395, 46080, 135135, 645120, 2027025, 10321920, 34459425, 185794560, 654729075, 3715891200, 13749310575, 81749606400, 316234143225, 1961990553600, 7905853580625, 51011754393600, 213458046676875, 1428329123020800
Offset: 0

Views

Author

Keywords

Comments

Product of pairs of successive terms gives factorials in increasing order. - Amarnath Murthy, Oct 17 2002
a(n) = number of down-up permutations on [n+1] for which the entries in the even positions are increasing. For example, a(3)=3 counts 2143, 3142, 4132. Also, a(n) = number of down-up permutations on [n+2] for which the entries in the odd positions are decreasing. For example, a(3)=3 counts 51423, 52413, 53412. - David Callan, Nov 29 2007
The double factorial of a positive integer n is the product of the positive integers <= n that have the same parity as n. - Peter Luschny, Jun 23 2011
For n even, a(n) is the number of ways to place n points on an n X n grid with pairwise distinct abscissa, pairwise distinct ordinate, and 180-degree rotational symmetry. For n odd, the number of ways is a(n-1) because the center point can be considered "fixed". For 90-degree rotational symmetry cf. A001813, for mirror symmetry see A000085, A135401, and A297708. - Manfred Scheucher, Dec 29 2017
Could be extended to include a(-1) = 1. But a(-2) is not defined, otherwise we would have 1 = a(0) = 0*a(-2). - Jianing Song, Oct 23 2019

Examples

			G.f. = 1 + x + 2*x^2 + 3*x^3 + 8*x^4 + 15*x^5 + 48*x^6 + 105*x^7 + 384*x^8 + ...
		

References

  • Putnam Contest, 4 Dec. 2004, Problem A3.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Bisections are A000165 and A001147. These two entries have more information.
A diagonal of A202212.

Programs

  • Haskell
    a006882 n = a006882_list !! n
    a006882_list = 1 : 1 : zipWith (*) [2..] a006882_list
    -- Reinhard Zumkeller, Oct 23 2014
    
  • Magma
    DoubleFactorial:=func< n | &*[n..2 by -2] >; [ DoubleFactorial(n): n in [0..28] ]; // Klaus Brockhaus, Jan 23 2011
    
  • Maple
    A006882 := proc(n) option remember; if n <= 1 then 1 else n*A006882(n-2); fi; end;
    A006882 := proc(n) doublefactorial(n) ; end proc; seq(A006882(n),n=0..10) ; # R. J. Mathar, Oct 20 2009
    A006882 := n -> mul(k, k = select(k -> k mod 2 = n mod 2, [$1 .. n])):  seq(A006882(n), n = 0 .. 10); # Peter Luschny, Jun 23 2011
    A006882 := proc(n) if n=0 then 1 else mul(n-2*k, k=0..floor(n/2)-1); fi; end; # N. J. A. Sloane, May 27 2016
  • Mathematica
    Array[ #!!&, 40, 0 ]
    multiFactorial[n_, k_] := If[n < 1, 1, If[n < k + 1, n, n*multiFactorial[n - k, k]]]; Array[ multiFactorial[#, 2] &, 27, 0] (* Robert G. Wilson v, Apr 23 2011 *)
  • PARI
    {a(n) = prod(i=0, (n-1)\2, n - 2*i )} \\ Improved by M. F. Hasler, Nov 30 2013
    
  • PARI
    {a(n) = if( n<2, n>=0, n * a(n-2))}; /* Michael Somos, Apr 06 2003 */
    
  • PARI
    {a(n) = if( n<0, 0, my(E); E = exp(x^2 / 2 + x * O(x^n)); n! * polcoeff( 1 + E * x * (1 + intformal(1 / E)), n))}; /* Michael Somos, Apr 06 2003 */
    
  • Python
    from sympy import factorial2
    def A006882(n): return factorial2(n) # Chai Wah Wu, Apr 03 2021

Formula

a(n) = Product_{i=0..floor((n-1)/2)} (n - 2*i).
E.g.f.: 1+exp(x^2/2)*x*(1+sqrt(Pi/2)*erf(x/sqrt(2))). - Wouter Meeussen, Mar 08 2001
Satisfies a(n+3)*a(n) - a(n+1)*a(n+2) = (n+1)!. [Putnam Contest]
a(n) = n!/a(n-1). - Vaclav Kotesovec, Sep 17 2012
a(n) * a(n+3) = a(n+1) * (a(n+2) + a(n)). a(n) * a(n+1) = (n+1)!. - Michael Somos, Dec 29 2012
a(n) ~ c * n^((n+1)/2) / exp(n/2), where c = sqrt(Pi) if n is even, and c = sqrt(2) if n is odd. - Vaclav Kotesovec, Nov 08 2014
a(2*n) = 2^n*a(n)*a(n-1). a(2^n) = 2^(2^n - 1) * 1!! * 3!! * 7!! * ... * (2^(n-1) - 1)!!. - Peter Bala, Nov 01 2016
a(n) = 2^h*(2/Pi)^(sin(Pi*h)^2/2)*Gamma(h+1) where h = n/2. This analytical extension supports the view that a(-1) = 1 is a meaningful numerical extension. With this definition (-1/2)!! = Gamma(3/4)/Pi^(1/4). - Peter Luschny, Oct 24 2019
a(n) ~ (n+1/6)*sqrt((2/e)*(n/e)^(n-1)*(Pi/2)^(cos(n*Pi/2)^2)). - Peter Luschny, Oct 25 2019
Sum_{n>=0} 1/a(n) = A143280. - Amiram Eldar, Nov 10 2020
Sum_{n>=0} 1/(a(n)*a(n+1)) = e - 1. - Andrés Ventas, Apr 12 2021

A052318 Number of labeled rooted trimmed trees with n nodes.

Original entry on oeis.org

1, 2, 3, 16, 145, 1536, 19579, 290816, 4942305, 94689280, 2020278931, 47523053568, 1222147737265, 34117226135552, 1027550555918475, 33213871550365696, 1146891651823112641, 42135941698113503232, 1641164216596258397347, 67550839668807638712320
Offset: 1

Views

Author

Christian G. Bower, Dec 15 1999

Keywords

Comments

A rooted trimmed tree is a tree with a forbidden limb of length 2.
A rooted tree with a forbidden limb of length k is a rooted tree where the path from any leaf inward hits a branching node or the root within k steps.

Crossrefs

Programs

  • Maple
    A:= proc(n) option remember; if n<=1 then x else convert(series(x* exp(A(n-1)-x^2), x,n), polynom) fi end: a:= n-> coeff(A(n+1), x,n)*n!: seq(a(n), n=1..25); # Alois P. Heinz, Aug 23 2008
  • Mathematica
    a[n_] := Sum[ Boole[ EvenQ[n-m]]*(m^((n+m)/2-2)/((n-m)/2)!)*((-1)^((n-m)/2)/(m-1)!), {m, 1, n}]*n!; Table[a[n], {n, 1, 18}] (* Jean-François Alcover, Sep 10 2012, after Vladimir Kruchinin *)
    Rest[CoefficientList[Series[-LambertW[-x/E^(x^2)],{x,0,20}],x]*Range[0,20]!] (* Vaclav Kotesovec, Jan 08 2014 *)
  • Maxima
    a(n):=sum((if mod(n-m,2)=0 then m^((n+m)/2-2)/((n-m)/2)!*(-1)^((n-m)/2) else 0)/(m-1)!,m,1,n); /* Vladimir Kruchinin, Aug 07 2012 */

Formula

E.g.f. satisfies A(x) = x*exp(A(x) - x^2).
E.g.f.: -LambertW(-x/exp(x^2)). - Vaclav Kotesovec, Jan 08 2014
a(n) ~ sqrt(1 + LambertW(-2*exp(-2))) * 2^(n/2) * n^(n-1) / (exp(n) * (-LambertW(-2*exp(-2)))^(n/2)). - Vaclav Kotesovec, Jan 08 2014

A240885 Decimal expansion of the unique positive solution of Integral_{0..x} exp(-t^2/2) dt = 1.

Original entry on oeis.org

1, 2, 7, 5, 5, 4, 7, 7, 3, 6, 4, 1, 7, 2, 1, 5, 3, 7, 8, 8, 0, 1, 3, 4, 3, 1, 9, 7, 4, 6, 7, 8, 5, 4, 7, 9, 0, 7, 3, 0, 7, 8, 1, 4, 3, 7, 4, 9, 4, 7, 2, 6, 1, 4, 3, 9, 4, 4, 8, 7, 3, 2, 6, 4, 6, 3, 1, 6, 4, 6, 9, 2, 5, 6, 4, 3, 0, 0, 8, 6, 4, 1, 6, 0, 4, 6, 2, 5, 2, 7, 5, 9, 5, 4, 2, 9, 3, 4, 5, 6
Offset: 1

Views

Author

Jean-François Alcover, Apr 14 2014

Keywords

Examples

			1.2755477364172...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[Sqrt[2]*InverseErf[Sqrt[2/Pi]], 10, 100] // First
  • PARI
    a=sqrt(Pi/2); b=a-1; c=1/sqrt(2); solve(x=1,2, a*erfc(c*x)-b) \\ Charles R Greathouse IV, Sep 02 2024

Formula

Solution to sqrt(Pi/2)*erf(x/sqrt(2)) = 1.

A052322 Number of labeled rooted trees with a forbidden limb of length 3.

Original entry on oeis.org

1, 2, 9, 40, 385, 4536, 66409, 1127792, 21981537, 483858640, 11873508361, 321497975448, 9522483900241, 306292854886760, 10632656242583145, 396223803663328096, 15776491521834720961, 668460175137505993248, 30030668624358362706697, 1425868954034374729854920
Offset: 1

Views

Author

Christian G. Bower, Dec 15 1999

Keywords

Comments

A rooted tree with a forbidden limb of length k is a rooted tree where the path from any leaf inward hits a branching node or the root within k steps.

Crossrefs

Programs

  • Mathematica
    Rest[CoefficientList[Series[-LambertW[-x*E^(-x^3)], {x, 0, 20}], x]* Range[0, 20]!] (* Vaclav Kotesovec, Jan 08 2014 *)

Formula

E.g.f. satisfies A(x) = x*exp(A(x) - x^3).
E.g.f: -LambertW(-x*exp(-x^3)). - Vaclav Kotesovec, Jan 08 2014
a(n) ~ sqrt(1+LambertW(-3*exp(-3))) * n^(n-1) * exp(n/3*LambertW(-3*exp(-3))). - Vaclav Kotesovec, Jan 08 2014

A052324 Number of increasing rooted trees with a forbidden limb of length 3.

Original entry on oeis.org

0, 1, 1, 2, 5, 19, 90, 520, 3475, 26550, 228050, 2177020, 22860090, 261870070, 3249793360, 43432062300, 621911561150, 9498946124800, 154152712434600, 2648808048264400, 48043086765929200, 917249983543337400
Offset: 0

Views

Author

Christian G. Bower, Dec 15 1999

Keywords

Comments

In an increasing rooted tree, nodes are numbered and numbers increase as you move away from root.
A rooted tree with a forbidden limb of length k is a rooted tree where the path from any leaf inward hits a branching node or the root within k steps.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Assuming[{Element[x, Reals], x > 0}, Series[-Log[1-6^(1/3)*Gamma[1/3]/3 + 1/3*x*ExpIntegralE[2/3, x^3/6]], {x, 0, 20}]], x]*Range[0, 20]! (* Vaclav Kotesovec, Mar 28 2014 *)
  • PARI
    {a(n)=local(A=x); for(i=0, n, A=intformal(exp(A-x^3/6+O(x^n)) )); n!*polcoeff(A, n)}
    for(n=0, 20, print1(a(n), ", ")) \\ Vaclav Kotesovec, Mar 28 2014

Formula

E.g.f. satisfies A'(x) = exp(A(x) - x^3/6). - corrected by Vaclav Kotesovec, Mar 28 2014
a(n) ~ d^n * (n-1)!, where d = 0.9546118344740519430556804... - Vaclav Kotesovec, Mar 28 2014
In closed form, d = 1/r, where r = 1.04754620033697244977759528695194261... is the root of the equation 1 = Integral_{x=0..r} exp(-x^3/6) dx. - Vaclav Kotesovec, Aug 21 2014

A002990 Number of n-node trees with a forbidden limb of length 4.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 5, 9, 19, 38, 86, 188, 439, 1026, 2472, 5997, 14835, 36964, 93246, 236922, 607111, 1565478, 4062797, 10599853, 27797420, 73224806, 193709710, 514406793, 1370937140, 3665714528, 9831891555, 26445886506, 71325268179
Offset: 0

Views

Author

Keywords

Comments

A tree with a forbidden limb of length k is a tree where the path from any leaf inward hits a branching node or another leaf within k steps.

References

  • A. J. Schwenk, Almost all trees are cospectral, pp. 275-307 of F. Harary, editor, New Directions in the Theory of Graphs. Academic Press, NY, 1973.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    with(numtheory):
    g:= proc(n) g(n):= `if`(n=0, 1, add(add(d*(g(d-1)-
          `if`(d=4, 1, 0)), d=divisors(j))*g(n-j), j=1..n)/n)
        end:
    a:= n-> `if`(n=0, 1, g(n-1)+(`if`(irem(n, 2, 'r')=0,
             g(r-1), 0)-add(g(i-1)*g(n-i-1), i=1..n-1))/2):
    seq(a(n), n=0..40);  # Alois P. Heinz, Jul 06 2014
  • Mathematica
    g[n_] := g[n] = If[n == 0, 1, Sum[Sum[d*(g[d-1]-If[d == 4, 1, 0]), {d, Divisors[j] }]*g[n-j], {j, 1, n}]/n]; a[n_] := If[n == 0, 1, g[n-1] + (If[Mod[n, 2 ] == 0, g[Quotient[n, 2]-1], 0] - Sum[g[i-1]*g[n-i-1], {i, 1, n-1}])/2]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 26 2015, after Alois P. Heinz *)

Formula

G.f.: 1 + B(x) + (B(x^2) - B(x)^2)/2 where B(x) is g.f. of A052327.
a(n) ~ c * d^n / n^(5/2), where d = 2.9224691962496551739365155005926..., c = 0.503471518908815272581177797536... . - Vaclav Kotesovec, Aug 25 2014

Extensions

More terms, formula and comments from Christian G. Bower, Dec 15 1999
Showing 1-6 of 6 results.