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

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

Original entry on oeis.org

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

Views

Author

Michael Somos, Mar 18 2003

Keywords

Comments

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

Examples

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

References

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

Crossrefs

Programs

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

Formula

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

A092691 a(n) = n! * Sum_{k=1..floor(n/2)} 1/(2k).

Original entry on oeis.org

0, 0, 1, 3, 18, 90, 660, 4620, 42000, 378000, 4142880, 45571680, 586776960, 7628100480, 113020427520, 1695306412800, 28432576972800, 483353808537600, 9056055981772800, 172065063653683200, 3562946373482496000, 74821873843132416000, 1697172166720622592000
Offset: 0

Views

Author

Michael Somos, Mar 04 2004

Keywords

Comments

Stirling transform of -(-1)^n*a(n-1)=[1,0,1,-3,18,...] is A052856(n-2)=[1,1,2,4,14,76,...].
Number of cycles of even cardinality in all permutations of [n]. Example: a(3)=3 because among (1)(2)(3), (1)(23), (12)(3), (13)(2), (132), (123) we have three cycles of even length. - Emeric Deutsch, Aug 12 2004

Examples

			a(4)=4!*(1/2+1/4)=18, a(5)=5!*(1/2+1/4)=90.
		

References

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

Crossrefs

A046674(n)=a(2n). Cf. A081358, A151883, A151884.

Programs

  • Mathematica
    nn = 20; Range[0, nn]! CoefficientList[
      D[Series[(1 - x^2)^(-y/2) ((1 + x)/(1 - x))^(1/2), {x, 0, nn}], y] /. y -> 1, x]  (* Geoffrey Critzer, Aug 27 2012 *)
  • PARI
    a(n)=if(n<0,0,n!*sum(k=1,n\2,1/k)/2)
    
  • PARI
    {a(n)=if(n<0, 0, n!*polcoeff( log(1-x^2+x*O(x^n))/(2*x-2), n))}

Formula

a(2n+1) = (2n+1)*a(2n).
From Vladeta Jovovic, Mar 06 2004: (Start)
a(n) = n!*(Psi(floor(n/2)+1)+gamma)/2.
E.g.f.: log(1-x^2)/(2*x-2). (End)
a(n) = n!/2*h(floor(n/2)), where h(n) = Sum_{k=1..n} 1/k. - Gary Detlefs, Jul 19 2011

A151883 Let g be a permutation of [1..n] having say j_i cycles of length i, with Sum_i i*j_i = n; sequence gives Sum_g Sum_{i even} (j_i)^2.

Original entry on oeis.org

0, 1, 3, 24, 120, 840, 5880, 54600, 491400, 5276880, 58045680, 749770560, 9747017280, 142685262720, 2140278940800, 35879056012800, 609943952217600, 11334678568012800, 215358892792243200, 4453151976335462400, 93516191503044710400, 2108447155238693068800
Offset: 1

Views

Author

N. J. A. Sloane, Jul 22 2009

Keywords

Crossrefs

Programs

  • Maple
    with(combinat):
    b:= proc(n, i) option remember; `if`(n=0, [1,0], `if`(i<1, 0,
          add(multinomial(n,n-i*j,i$j)/j!*(i-1)!^j*(p-> p+
          `if`(i::even, [0, p[1]*j^2], 0))(b(n-i*j, i-1)), j=0..n/i)))
        end:
    a:= n-> b(n$2)[2]:
    seq(a(n), n=1..30);  # Alois P. Heinz, Oct 21 2015
  • Mathematica
    multinomial[n_, k_] := n!/Times @@ (k!); b[n_, i_] := b[n, i] = If[n==0, {1, 0}, If[i<1, {0, 0}, Sum[multinomial[n, Join[{n-i*j}, Array[i&, j]]]/j! * (i-1)!^j * Function[p, p+If[EvenQ[i], {0, p[[1]]*j^2}, {0, 0}]][b[n-i*j, i-1]], {j, 0, n/i}]]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Mar 13 2017, after Alois P. Heinz *)
Showing 1-3 of 3 results.