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.

A003483 Number of square permutations of n elements.

Original entry on oeis.org

1, 1, 1, 3, 12, 60, 270, 1890, 14280, 128520, 1096200, 12058200, 139043520, 1807565760, 22642139520, 339632092800, 5237183952000, 89032127184000, 1475427973219200, 28033131491164800, 543494606861606400, 11413386744093734400, 235075995738558374400, 5406747901986842611200, 126214560713084056012800
Offset: 0

Views

Author

Keywords

Comments

Number of permutations p in S_n such that there exists q in S_n with q^2=p.
"A permutation P has a square root if and only if the numbers of cycles of P that have each even length are even numbers." [Theorem 4.8.1. on p.147 from the Wilf reference]. - Joerg Arndt, Sep 08 2014

Examples

			a(3) = 3: permutations with square roots are identity and two 3-cycles.
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 5.11.
  • H. S. Wilf, Generatingfunctionology, 3rd ed., A K Peters Ltd., Wellesley, MA, 2006, p. 157.

Crossrefs

Cf. A103619 (cube root), A103620 (fourth root), A215716 (fifth root), A215717 (sixth root), A215718 (seventh root).
Column k=2 of A247005.

Programs

  • Maple
    with(combinat):
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(`if`(irem(i, 2)=0 and irem(j, 2)=1, 0, (i-1)!^j*
          multinomial(n, n-i*j, i$j)/j!*b(n-i*j, i-1)), j=0..n/i)))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..30);  # Alois P. Heinz, Sep 08 2014
  • Mathematica
    max = 20; f[x_] := Sqrt[(1 + x)/(1 - x)]*  Product[ Cosh[x^(2*k)/(2*k)], {k, 1, max}]; se = Series[ f[x], {x, 0, max}]; CoefficientList[ se, x]*Range[0, max]! (* Jean-François Alcover, Oct 05 2011, after g.f. *)
    multinomial[n_, k_List] := n!/Times @@ (k!); b[n_, i_] := b[n, i] = If[n == 0, 1, If[i<1, 0, Sum[If[Mod[i, 2] == 0 && Mod[j, 2] == 1, 0, (i-1)!^j* multinomial[n, Join[{n-i*j}, Array[i&, j]]]/j!*b[n-i*j, i-1]], {j, 0, n/i}]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Mar 23 2015, after Alois P. Heinz *)
    a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ Sqrt[ (1 + x) / (1 - x)] Product[ Cosh[ x^k / k], {k, 2, n, 2}], {x, 0, n}]]; (* Michael Somos, Jul 11 2018 *)
  • PARI
    N=66; x='x+O('x^66);
    Vec(serlaplace( sqrt((1+x)/(1-x))*prod(k=1,N, cosh(x^(2*k)/(2*k)))))
    \\ Joerg Arndt, Sep 08 2014

Formula

E.g.f.: sqrt((1 + x)/(1 - x)) * Product_{k>=1} cosh( x^(2*k)/(2*k) ). [Blum, corrected].
a(2*n+1) = (2*n + 1)*a(2*n).
Asymptotics: a(n) ~ n! * sqrt(2/(n*Pi)) * e^G, where e^G = Product_{k>=1} cosh(1/(2k)) ~ 1.22177951519253683396485298445636121278881... (see A246945). - corrected by Vaclav Kotesovec, Sep 13 2014
G = Sum_{j>=1} (-1)^(j + 1) * Zeta(2*j)^2 * (1 - 1/2^(2*j)) / (j * Pi^(2*j)). - Vaclav Kotesovec, Sep 20 2014

Extensions

More terms from Vladeta Jovovic, Mar 28 2001
Additional comments from Michael Somos, Jun 27 2002
Minor edits by Vaclav Kotesovec, Sep 16 2014 and Sep 21 2014

A249673 Decimal expansion of Product_{n>=1} cosh(1/n).

Original entry on oeis.org

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

Views

Author

Vaclav Kotesovec, Nov 03 2014

Keywords

Examples

			2.116465536505484775878572227025831988148089392809082568281348...
		

Crossrefs

Programs

  • Maple
    evalf(exp(sum(log(cosh(1/n)), n=1..infinity)), 100)
  • PARI
    default(realprecision,120); exp(sumpos(k=1, log(cosh(1/k))))

Formula

From Amiram Eldar, Jul 30 2023: (Start)
Equals exp(Sum_{k>=1} 2^(2*k-1)*(2^(2*k)-1)*B(2*k)*zeta(2*k)/(k*(2*k)!)), where B(k) is the k-th Bernoulli number.
Equals exp(Sum_{k>=1} (-1)^(k+1)*(2^(2*k)-1)*zeta(2*k)^2/(k*Pi^(2*k))). (End)

A118817 Decimal expansion of Product_{n >= 1} cos(1/n).

Original entry on oeis.org

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

Views

Author

Fredrik Johansson, May 23 2006

Keywords

Examples

			0.38853615333517585918432957568703590501390...
		

Crossrefs

Programs

  • Maple
    nn:= 120:
    p:= product(cos(1/n), n=1..infinity):
    f:= evalf(p, nn+10):
    s:= convert(f, string):
    seq(parse(s[n+1]), n=1..nn);  # Alois P. Heinz, Nov 04 2013
  • Mathematica
    S = Series[Log[Cos[x]], {x, 0, 400}]; N[Exp[N[Sum[SeriesCoefficient[S, 2k] Zeta[2k], {k, 1, 200}], 70]], 50]
    Block[{$MaxExtraPrecision = 1000}, Do[Print[N[1/Exp[Sum[(2^(2*n) - 1)*Zeta[2*n]^2/(n*Pi^(2*n)), {n, 1, m}]], 110]], {m, 250, 300}]] (* Vaclav Kotesovec, Sep 20 2014 *)
  • PARI
    exp(-sumpos(n=1,-log(cos(1/n)))) \\ warning: requires 2.6.2 or greater; Charles R Greathouse IV, Nov 04 2013
    
  • PARI
    T(n)=((-4)^n-(-16)^n)*bernfrac(2*n)/2/n/(2*n)!
    lm=lambertw(2*log(Pi/2)*10^default(realprecision))/2/log(Pi/2); exp(-sum(n=1,lm,T(n)*zeta(2*n))) \\ Charles R Greathouse IV, Nov 06 2013

Formula

Equals exp(Sum_{n>=1} -c(n)*zeta(2*n)), where c(n) = A046990(n)/A046991(n).
Equals exp(-Sum_{n>=1} (2^(2*n)-1) * Zeta(2*n)^2 / (n*Pi^(2*n)) ). - Vaclav Kotesovec, Sep 20 2014
Equals exp(Sum_{k>=1} (-1)^k*2^(2*k-1)*(2^(2*k)-1)*B(2*k)*zeta(2*k)/(k*(2*k)!)), where B(k) is the k-th Bernoulli number. - Amiram Eldar, Jul 30 2023

Extensions

Corrected offset and extended by Robert G. Wilson v, Nov 03 2013

A270614 Decimal expansion of Product_{k>=1} ((1 + sinh(1/k)) / exp(1/k)).

Original entry on oeis.org

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

Views

Author

Vaclav Kotesovec, Mar 20 2016

Keywords

Examples

			0.625635801977949844597484816103104429905206355112713196896034983259858...
		

Crossrefs

Programs

  • Maple
    evalf(Product((1+sinh(1/k))/exp(1/k), k=1..infinity), 120);
  • PARI
    default(realprecision, 120); exp(sumpos(k=1, log((1+sinh(1/k))/exp(1/k))))

Formula

Equals limit n->infinity A130263(n)/n!.

A246948 Decimal expansion of the coefficient c appearing in the asymptotic expression of the probability that a random n-permutation is a cube as c/n^3.

Original entry on oeis.org

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

Views

Author

Jean-François Alcover, Sep 08 2014

Keywords

Examples

			1.072997944389527017737971394954465555681...
		

Crossrefs

Cf. A246945.

Programs

  • Maple
    evalf(3^(5/6) * GAMMA(1/3) / (2*Pi) * Product(1/3*(exp(1/(3*k)) + 2*exp(-1/(6*k)) * cos(sqrt(3)/(6*k))), k=1..infinity),100) # Vaclav Kotesovec, Sep 17 2014
  • Mathematica
    digits = 40; m0 = 1000; dm = 1000; psi[x_] := 1/3*(E^x + 2*E^(-x/2)*Cos[Sqrt[3]*(x/2)]); tail[m_] := (-98761420800*PolyGamma[2, m] - 4572288*PolyGamma[5, m] - 53*PolyGamma[8, m])/31998700339200; Clear[f]; f[m_] := f[m] = Sum[Log[psi[1/(3*k)]], {k, 1, m - 1}] + tail[m] // N[#, digits + 10] &; f[m0]; f[m = m0 + dm]; While[RealDigits[f[m], 10, digits + 5] != RealDigits[f[m - dm], 10, digits + 5], Print["f(", m, ") = ", f[m]]; m = m + dm]; c = 3^(5/6)*Gamma[1/3]/(2*Pi)*E^f[m]; RealDigits[c, 10, 40] // First
  • PARI
    default(realprecision,150); 3^(5/6) * gamma(1/3) / (2*Pi) * exp(sumpos(k=1,log(1/3*(exp(1/(3*k)) + 2*exp(-1/(6*k)) * cos(sqrt(3)/(6*k)))))) \\ Vaclav Kotesovec, Sep 21 2014

Formula

c = 3^(5/6)*Gamma(1/3)/(2*Pi)*prod_{k>=1} psi(1/(3k)), where psi(x) = 1/3*(e^x + 2*e^(-x/2)*cos(sqrt(3)*(x/2))).

Extensions

More terms from Vaclav Kotesovec, Sep 17 2014

A349645 Triangular array read by rows: T(n,k) is the number of square n-permutations possessing exactly k cycles; n >= 0, 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 0, 11, 0, 1, 0, 24, 0, 35, 0, 1, 0, 0, 184, 0, 85, 0, 1, 0, 720, 0, 994, 0, 175, 0, 1, 0, 0, 9708, 0, 4249, 0, 322, 0, 1, 0, 40320, 0, 72764, 0, 14889, 0, 546, 0, 1, 0, 0, 648576, 0, 402380, 0, 44373, 0, 870, 0, 1
Offset: 0

Views

Author

Steven Finch, Nov 23 2021

Keywords

Comments

A permutation p in S_n is a square if there exists q in S_n with q^2=p.
For such a p, the number of cycles of any even length in its disjoint cycle decomposition must be even.

Examples

			The three square 3-permutations are (1, 2, 3) with three cycles (fixed points) and (3, 1, 2) & (2, 3, 1), each with one cycle.
Among the twelve square 4-permutations are {1, 4, 2, 3} & {1, 3, 4, 2} and {3, 4, 1, 2} & {4, 3, 2, 1}, all with two cycles but differing types.
Triangle begins:
[0]   1;
[1]   0,   1;
[2]   0,   0,    1;
[3]   0,   2,    0,   1;
[4]   0,   0,   11,   0,    1;
[5]   0,  24,    0,  35,    0,   1;
[6]   0,   0,  184,   0,   85,   0,   1;
[7]   0, 720,    0, 994,    0, 175,   0,   1;
[8]   0,   0, 9708,   0, 4249,   0, 322,   0,   1;
...
		

Crossrefs

Columns k=0-1 give: A000007, A005359(n-1).
Row sums give A003483.
T(n+2,n) gives A000914.

Programs

  • Maple
    with(combinat):
    b:= proc(n, i) option remember; expand(`if`(n=0, 1, `if`(i<1, 0,
          add(`if`(irem(i, 2)=0 and irem(j, 2)=1, 0, (i-1)!^j*
          multinomial(n, n-i*j, i$j)/j!*b(n-i*j, i-1))*x^j, j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n$2)):
    seq(T(n), n=0..12);  # Alois P. Heinz, Nov 23 2021
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!);
    b[n_, i_] := b[n, i] = Expand[If[n == 0, 1, If[i < 1, 0,
         Sum[If[Mod[i, 2] == 0 && Mod[j, 2] == 1, 0, (i-1)!^j*multinomial[n,
         Join[{n-i*j}, Table[i, {j}]]]/j!*b[n-i*j, i-1]]*x^j, {j, 0, n/i}]]]];
    T[n_] := With[{p = b[n, n]}, Table[Coefficient[p, x, i], {i, 0, n}]];
    Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Dec 28 2021, after Alois P. Heinz *)
Showing 1-6 of 6 results.