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

A247005 Number A(n,k) of permutations on [n] that are the k-th power of a permutation; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 6, 1, 1, 1, 2, 3, 24, 1, 1, 1, 1, 4, 12, 120, 1, 1, 1, 2, 3, 16, 60, 720, 1, 1, 1, 1, 6, 9, 80, 270, 5040, 1, 1, 1, 2, 1, 24, 45, 400, 1890, 40320, 1, 1, 1, 1, 6, 4, 96, 225, 2800, 14280, 362880, 1, 1, 1, 2, 3, 24, 40, 576, 1575, 22400, 128520, 3628800, 1
Offset: 0

Views

Author

Alois P. Heinz, Sep 09 2014

Keywords

Comments

Number of permutations p on [n] such that a permutation q on [n] exists with p=q^k.

Examples

			A(3,0) = 1: (1,2,3).
A(3,1) = 6: (1,2,3), (1,3,2), (2,1,3), (2,3,1), (3,1,2), (3,2,1).
A(3,2) = 3: (1,2,3), (2,3,1), (3,1,2).
A(3,3) = 4: (1,2,3), (1,3,2), (2,1,3), (3,2,1).
Square array A(n,k) begins:
  1,    1,    1,    1,    1,    1,    1,    1,    1, ...
  1,    1,    1,    1,    1,    1,    1,    1,    1, ...
  1,    2,    1,    2,    1,    2,    1,    2,    1, ...
  1,    6,    3,    4,    3,    6,    1,    6,    3, ...
  1,   24,   12,   16,    9,   24,    4,   24,    9, ...
  1,  120,   60,   80,   45,   96,   40,  120,   45, ...
  1,  720,  270,  400,  225,  576,  190,  720,  225, ...
  1, 5040, 1890, 2800, 1575, 4032, 1330, 4320, 1575, ...
		

Crossrefs

Main diagonal gives A247009.
Cf. A247026 (the same for endofunctions), A155510.

Programs

  • Maple
    with(combinat): with(numtheory): with(padic):
    b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0, add(
          `if`(irem(j, mul(p^ordp(k, p), p=factorset(i)))=0, (i-1)!^j*
          multinomial(n, n-i*j, i$j)/j!*b(n-i*j, i-1, k), 0), j=0..n/i)))
        end:
    A:= (n, k)-> `if`(k=0, 1, b(n$2, k)):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!); b[, 1, ] = 1; b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, Sum[If[Mod[j, Product[ p^IntegerExponent[k, p], {p, FactorInteger[i][[All, 1]]}]] == 0, (i - 1)!^j*multinomial[n, Join[{n-i*j}, Array[i&, j]]]/j!*b[n-i*j, i-1, k], 0], {j, 0, n/i}]]]; A[n_, k_] := If[k == 0, 1, b[n, n, k]]; Table[A[n, d - n], {d, 0, 14}, {n, 0, d}] // Flatten (* Jean-François Alcover, Jan 14 2017, after Alois P. Heinz *)

A102759 Number of partitions of n-set in which number of blocks of size 2k is even (or zero) for every k.

Original entry on oeis.org

1, 1, 1, 2, 8, 27, 82, 338, 1647, 7668, 37779, 210520, 1276662, 7985200, 51302500, 358798144, 2677814900, 20309850311, 160547934756, 1344197852830, 11666610870142, 104156661915427, 962681713955130, 9238216839975106, 91508384728188792, 930538977116673878
Offset: 0

Views

Author

Vladeta Jovovic, Feb 10 2005, Aug 05 2007

Keywords

Crossrefs

Programs

  • Maple
    with(combinat):
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
           add(`if`(irem(i, 2)=1 or irem(j, 2)=0, multinomial(
           n, n-i*j, i$j)/j!*b(n-i*j, i-1), 0), j=0..n/i)))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..30);  # Alois P. Heinz, Mar 08 2015
  • Mathematica
    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] == 1 || Mod[j, 2] == 0, multinomial[n, Join[{n-i*j}, Table[i, {j}]]]/j!*b[n-i*j, i-1], 0], {j, 0, n/i}]]] ; a[n_] := b[n, n]; Table[ a[n], {n, 0, 30}] (* Jean-François Alcover, Mar 16 2015, after Alois P. Heinz *)
  • PARI
    N=31; x='x+O('x^N);
    Vec(serlaplace(exp(sinh(x))*prod(k=1,N,cosh(x^(2*k)/(2*k)!))))
    /* gives: [1, 1, 1, 2, 8, 27, 82, 338, 1647, 7668, ...] , Joerg Arndt, Jan 03 2011 */

Formula

E.g.f. for offset 2: exp(sinh(x))*Product_{k>=1} cosh(x^(2*k)/(2*k)!). - Geoffrey Critzer, Jan 02 2011

Extensions

Offset changed to 0 and two 1's prepended by Alois P. Heinz, Mar 08 2015

A103619 Number of permutations of n elements admitting a cube root.

Original entry on oeis.org

1, 1, 2, 4, 16, 80, 400, 2800, 22400, 181440, 1814400, 19958400, 218803200, 2844441600, 39822182400, 556972416000, 8911558656000, 151496497152000, 2579172973977600, 49004286505574400, 980085730111488000, 19584861165821952000, 430866945648082944000
Offset: 0

Views

Author

Vladeta Jovovic, Feb 11 2005

Keywords

Crossrefs

Programs

  • Maple
    with(combinat):
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(`if`(irem(j, igcd(i, 3))<>0, 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..25);  # Alois P. Heinz, Sep 08 2014
  • Mathematica
    CoefficientList[Series[(1-x^3)^(1/3)/(1-x) * Product[1/3*E^(1/3*x^(3*m)/m) + 2/3*E^(-1/6*x^(3*m)/m) * Cos[1/6*3^(1/2)*x^(3*m)/m],{m,1,20}],{x,0,20}],x] * Range[0,20]! (* Vaclav Kotesovec, Sep 13 2014 *)

Formula

E.g.f.: (1-x^3)^(1/3)/(1-x)*Product(1/3*exp(1/3*x^(3*m)/m)+2/3*exp(-1/6*x^(3*m)/m)*cos(1/6*3^(1/2)*x^(3*m)/m), m = 1 .. infinity).

A103620 Number of permutations of n elements admitting a fourth root.

Original entry on oeis.org

1, 1, 1, 3, 9, 45, 225, 1575, 11130, 100170, 897750, 9875250, 108523800, 1410809400, 18332414100, 274986211500, 4127136413400, 70161319027800, 1192076391706200, 22649451442417800, 430247983427262000, 9035207651972502000
Offset: 0

Views

Author

Vladeta Jovovic, Feb 11 2005

Keywords

Crossrefs

Programs

  • Maple
    with(combinat): with(numtheory): with(padic):
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0, add(
          `if`(irem(j, mul(p^ordp(4, p), p=factorset(i)))=0, (i-1)!^j*
          multinomial(n, n-i*j, i$j)/j!*b(n-i*j, i-1), 0), j=0..n/i)))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..25);  # Alois P. Heinz, Sep 09 2014
  • Mathematica
    CoefficientList[Series[((1+x)/(1-x))^(1/2) * Product[1/2*Cos[1/2*x^(2*m)/m] + 1/2*Cosh[1/2*x^(2*m)/m],{m,1,20}],{x,0,20}],x] * Range[0,20]! (* Vaclav Kotesovec, Sep 13 2014 *)

Formula

E.g.f.: ((1+x)/(1-x))^(1/2)*Product(1/2*cos(1/2*x^(2*m)/m)+1/2*cosh(1/2*x^(2*m)/m), m = 1 .. infinity).

A215716 Number of permutations on n points admitting a fifth root.

Original entry on oeis.org

1, 1, 2, 6, 24, 96, 576, 4032, 32256, 290304, 2612736, 28740096, 344881152, 4483454976, 62768369664, 878757175296, 14060114804736, 239021951680512, 4302395130249216, 81745507474735104, 1553164642019966976, 32616457482419306496, 717562064613224742912
Offset: 0

Views

Author

Eric M. Schmidt, Aug 22 2012

Keywords

Comments

a(n) is the number of permutations of n points such that for all positive m, the number of (5m)-cycles is a multiple of 5.

Crossrefs

Column k=5 of A247005.

Programs

  • Maple
    with(combinat):
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(`if`(irem(j, igcd(i, 5))<>0, 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..25);  # Alois P. Heinz, Sep 08 2014
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!); b[n_, i_] := b[n, i] = If[n == 0, 1, If[i<1, 0, Sum[If[Mod[j, GCD[i, 5]] != 0, 0, (i-1)!^j*multinomial[n, Prepend[Table[i, {j}], n-i*j]]/j!*b[n-i*j, i-1]], {j, 0, n/i}]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Oct 21 2016, after Alois P. Heinz *)
  • PARI
    { A215716_list(numterms) = Vec(serlaplace((1 - x^5 + O(x^numterms))^(1/5)/(1-x) * prod(m=1, numterms\5, exp5(x^(5*m)/(5*m), numterms\(5*m)+1)))); }
    { exp5(y, prec) = subst(serconvol(exp(x + O(x^prec)), 1/(1-x^5) + O(x^prec)), x, y); }

Formula

E.g.f.: (1 - x^5)^(1/5)/(1 - x) * Product(E_5(x^(5m)/(5m)), m = 1 .. infinity), where E_5(x) = 1 + x^5/5! + x^10/10! + ... .

A215717 Number of permutations on n points admitting a sixth root.

Original entry on oeis.org

1, 1, 1, 1, 4, 40, 190, 1330, 8680, 52920, 340200, 6237000, 76211520, 1098857760, 11677585920, 109679169600, 1497396700800, 41977644508800, 783593969558400, 15973899557616000, 263524120417958400, 3733362595368806400, 64262934423790502400
Offset: 0

Views

Author

Eric M. Schmidt, Aug 23 2012

Keywords

Comments

a(n) is the number of permutations of n points such that for all positive m, the number of m-cycles is a multiple of gcd(m, 6).

Crossrefs

Column k=6 of A247005.

Programs

  • Maple
    with(combinat):
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(`if`(irem(j, igcd(i, 6))<>0, 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..25);  # Alois P. Heinz, Sep 08 2014
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!); b[n_, i_] := b[n, i] = If[n == 0, 1, If[i<1, 0, Sum[If[Mod[j, GCD[i, 6]] != 0, 0, (i-1)!^j*multinomial[n, Prepend[Table[i, {j}], n-i*j]]/j!*b[n-i*j, i - 1]], {j, 0, n/i}]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Oct 21 2016, after Alois P. Heinz *)
  • PARI
    { A215717_list(numterms) = Vec(serlaplace(prod(m=1, numterms, expthin(gcd(m, 6), x^m/m, numterms\m+1))) + O(x^numterms)); }
    { expthin(j, y, prec) = subst(serconvol(exp(x + O(x^prec)), 1/(1-x^j) + O(x^prec)), x, y); }

Formula

E.g.f.: prod(m>=1, E_(gcd(m,6))(x^m/m) ), where E_j(x) = 1 + x^j/j! + x^(2j)/(2j)! + ... .

A215718 Number of permutations on n points admitting a seventh root.

Original entry on oeis.org

1, 1, 2, 6, 24, 120, 720, 4320, 34560, 311040, 3110400, 34214400, 410572800, 5337446400, 69386803200, 1040802048000, 16652832768000, 283098157056000, 5095766827008000, 96819569713152000, 1936391394263040000, 38727827885260800000, 852012213475737600000
Offset: 0

Views

Author

Eric M. Schmidt, Aug 23 2012

Keywords

Comments

a(n) is the number of permutations of n points such that for all positive m, the number of (7*m)-cycles is a multiple of 7.

Crossrefs

Column k=7 of A247005.

Programs

  • Maple
    with(combinat):
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(`if`(irem(j, igcd(i, 7))<>0, 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..25);  # Alois P. Heinz, Sep 08 2014
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!); b[n_, i_] := b[n, i] = If[n == 0, 1, If[i<1, 0, Sum[If[Mod[j, GCD[i, 7]] != 0, 0, (i-1)!^j*multinomial[n, Prepend[Table[i, {j}], n-i*j]]/j!*b[n-i*j, i - 1]], {j, 0, n/i}]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Oct 21 2016, after Alois P. Heinz *)
  • PARI
    { A215718_list(numterms) = Vec(serlaplace((1 - x^7 + O(x^numterms))^(1/7)/(1-x) * prod(m=1, numterms\7, exp7(x^(7*m)/(7*m), numterms\(7*m)+1)))); }
    { exp7(y, prec) = subst(serconvol(exp(x + O(x^prec)), 1/(1-x^7) + O(x^prec)), x, y); }

Formula

E.g.f.: ((1 - x^7)^(1/7)/(1 - x)) * Product_{m>=1} E_7(x^(7*m)/(7*m)), where E_7(x) = 1 + x^7/7! + x^14/14! + ... .

A246945 Decimal expansion of the coefficient e^G appearing in the asymptotic expression of the probability that a random n-permutation is a square, as sqrt(2/Pi)*e^G/sqrt(n).

Original entry on oeis.org

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

Views

Author

Jean-François Alcover, Sep 08 2014

Keywords

Examples

			G = 0.2003084150040401276417752235643787366634879653405876198956293474890714...
e^G = 1.22177951519253683396485298445636121278881014814697728683863962970923...
sqrt(2/Pi)*e^G = 0.974839011877335012323657925154410019528043463671159620094...
		

References

Crossrefs

Programs

  • Maple
    evalf(1/(product(sech(1/(2*k)), k=1..infinity)), 120) # Vaclav Kotesovec, Sep 20 2014
  • Mathematica
    digits = 42; m0 = 10^4; dm = 1000; tail[m_] := (406425600*PolyGamma[1, m] - 2822400*PolyGamma[3, m] + 9408*PolyGamma[5, m] - 17*PolyGamma[7, m])/3251404800; Clear[g]; g[m_] := g[m] = Sum[Log[Cosh[1/(2*k)]], {k, 1, m - 1}] + tail[m] // N[#, digits + 10] &; g[m0] ; g[m = m0 + dm]; While[RealDigits[g[m], 10, digits + 5] != RealDigits[g[m - dm], 10, digits + 5], Print["m = ", m]; m = m + dm]; G = g[m]; RealDigits[E^G, 10, digits ] // First
    Block[{$MaxExtraPrecision = 1000}, Do[Print[N[Exp[Sum[(-1)^(n + 1)*Zeta[2*n]^2*(1 - 1/2^(2*n))/n/Pi^(2*n), {n, 1, m}]], 120]], {m, 100, 150}]] (* Vaclav Kotesovec, Sep 20 2014 *)

Formula

e^G = prod_{k>=1} cosh(1/(2k)).
G = Sum_{n>=1} (-1)^(n+1) * Zeta(2*n)^2 * (1-1/2^(2*n)) / (n * Pi^(2*n)). - Vaclav Kotesovec, Sep 20 2014

Extensions

More terms from Vaclav Kotesovec, Sep 20 2014

A060307 Number of degree-4n permutations without odd cycles and such that number of cycles of size 2k is even (or zero) for every k.

Original entry on oeis.org

1, 3, 1365, 8534295, 204893714025, 15735481638151275, 2760485970394430603325, 1006427270776555103089989375, 659316841888260316767029819420625, 740198799422691022278446846884066321875, 1306298536067264588818106780684613899555353125
Offset: 0

Views

Author

Vladeta Jovovic, Mar 28 2001, Aug 10 2007

Keywords

Crossrefs

Cf. A003483.
Cf. A013302.

Programs

  • Maple
    with(combinat):
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0, add(
          `if`(j=0 or irem(i, 2)=0 and irem(j, 2)=0, multinomial(n,
           n-i*j, i$j)*(i-1)!^j/j!*b(n-i*j, i-1), 0), j=0..n/i)))
        end:
    a:= n-> b(4*n$2):
    seq(a(n), n=0..15);  # Alois P. Heinz, Mar 09 2015
  • Mathematica
    nn = 40; Select[Range[0, nn]! CoefficientList[Series[Product[Cosh[x^(2 i)/(2 i)], {i, 1, nn}], {x, 0, nn}], x], # > 0 &] (* Geoffrey Critzer, Jan 16 2012 *)

Formula

E.g.f.: Product_{k >= 1} cosh x^(2k)/(2k).

A212599 Number of functions on n labeled points to themselves (endofunctions) such that the number of cycles of f that have each even size is even.

Original entry on oeis.org

1, 1, 3, 18, 160, 1875, 27126, 466186, 9275064, 209654325, 5307031000, 148720701426, 4570816040352, 152874605142727, 5527634477245440, 214862754390554250, 8934811701563214976, 395788795274021394729, 18606559519007667893376, 925222631836457779380370, 48518852386696450625510400
Offset: 0

Views

Author

Geoffrey Critzer, May 22 2012

Keywords

Crossrefs

Programs

  • Maple
    with(combinat):
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(`if`(irem(j, igcd(i, 2))<>0, 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-> add(b(j, j)*n^(n-j)*binomial(n-1, j-1), j=0..n):
    seq(a(n), n=0..25);  # Alois P. Heinz, Sep 08 2014
  • Mathematica
    nn=20;t=Sum[n^(n-1)x^n/n!,{n,1,nn}];p=Product[Cosh[t^(2i)/(2i)],{i,1,nn}];Range[0,nn]! CoefficientList[Series[((1+t)/(1-t))^(1/2) p,{x,0,nn}],x]

Formula

E.g.f.: ((1+T(x))/(1-T(x)))^(1/2) * Product_{i>=1} cosh(T(x)^(2*i)/(2*i)) where T(x) is the e.g.f. for A000169.

Extensions

Maple program fixed by Vaclav Kotesovec, Sep 13 2014
Showing 1-10 of 22 results. Next