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.

Previous Showing 11-20 of 22 results. Next

A214849 Number of n-permutations having all cycles of odd length and at most one fixed point.

Original entry on oeis.org

1, 1, 0, 2, 8, 24, 184, 1000, 8448, 66752, 670976, 6771456, 80540800, 981684352, 13555365888, 193136762624, 3042586824704, 49558509465600, 877951349198848, 16081833643651072, 316609129672114176, 6439690754082062336, 139521103623589068800
Offset: 0

Views

Author

Geoffrey Critzer, Mar 08 2013

Keywords

Comments

a(n) is also the number of n-permutations with exactly one square root. Cf. A003483 which counts n-permutations with at least one square root.

Examples

			a(6)= 184 because we have 144 6-permutations of the type (1,2,3,4,5)(6) and 40 of the type (1,2,3)(4,5,6).  These have exactly one square root: (1,4,2,5,3)(6) and (1,3,2)(4,6,5).
		

Programs

  • Mathematica
    nn=22; Range[0,nn]! CoefficientList[Series[(1+x)((1+x)/(1-x))^(1/2) Exp[-x], {x,0,nn}], x]

Formula

E.g.f.: (1 + x)*((1+x)/(1-x))^(1/2)*exp(-x).
a(n) ~ 4*n^n/exp(n+1). - Vaclav Kotesovec, Oct 08 2013

A102760 Number of partitions of n-set into "lists", in which every even list appears an even number of times, cf. A000262.

Original entry on oeis.org

1, 1, 1, 7, 37, 241, 1381, 13231, 140617, 1483777, 16211881, 217551511, 3384215341, 50221272817, 782154787597, 13913712591871, 272739557719441, 5282625708305281, 106588332600443857, 2354480141600267047, 56238135934525073461, 1338131691952924913521
Offset: 0

Views

Author

Vladeta Jovovic, Feb 10 2005

Keywords

Crossrefs

Programs

  • Maple
    with(combinat):
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(`if`(i::even and j::odd, 0, b(n-i*j, i-1)*
          multinomial(n, n-i*j, i$j)/j!*i!^j), j=0..n/i)))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..25);  # Alois P. Heinz, May 10 2016
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!); b[n_, i_] := b[n, i] = If[n == 0, 1, If[i<1, 0, Sum[If[EvenQ[i] && OddQ[j], 0, b[n-i*j, i- 1] * multinomial[n, Join[{n - i*j}, Array[i &, j]]]/j!*i!^j], {j, 0, n/i}]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Feb 05 2017, after Alois P. Heinz *)

Formula

E.g.f.: exp(x/(1-x^2))*Product_{k>0} cosh(x^(2*k)).

Extensions

a(0)=1 prepended by Alois P. Heinz, May 10 2016

A214851 Irregular triangular array read by rows. T(n,k) is the number of n-permutations that have exactly k square roots. n >= 1, 0 <= k <= A000085(n).

Original entry on oeis.org

0, 1, 1, 0, 1, 3, 2, 0, 0, 1, 12, 8, 3, 0, 0, 0, 0, 0, 0, 0, 1, 60, 24, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 450, 184, 0, 0, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Geoffrey Critzer, Mar 08 2013

Keywords

Comments

Row sums = n!.
Sum_{k=1...A000085(n)} T(n,k)*k = n!.
Sum_{k=1...A000085(n)} T(n,k) = A003483(n).
Column k=0 is n! - A003483(n).

Examples

			0, 1,
1, 0, 1,
3, 2, 0, 0, 1,
12, 8, 3, 0, 0, 0, 0, 0, 0, 0, 1,
60, 24, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
450, 184, 0, 0, 85, 0,0,0,...,1 where the 1 is in column k=76.
T(5,2)= 35 because we have 20 5-permutations of the type (1,2,3)(4)(5) and 15 of the type (1,2)(3,4)(5).  These have 2 square roots:(1,3,2)(4)(5),(1,3,2)(4,5) and (1,3,2,4)(5),(3,1,4,2)(5) respectively.
		

Crossrefs

Cf. A214849 (column k=1), A214854 (column k=2).

Programs

  • Mathematica
    (* Warning: the code is very inefficient, it takes about one minute to run on a laptop computer. *) a={1,2,4,10,26}; Table[Distribution[Distribution[Table[MultiplicationTable[Permutations[m], Permute[#1,#2]&][[n]][[n]], {n,1,m!}], Range[1,m!]], Range[0,a[[m]]]], {m,1,5}] //Grid

A130275 Number of degree-n permutations such that number of cycles of size 2k is odd (or zero) for every k.

Original entry on oeis.org

1, 1, 2, 6, 21, 105, 675, 4725, 35805, 322245, 3236625, 35602875, 425872755, 5536345815, 77347084815, 1160206272225, 18403556596425, 312860462139225, 5643104418376425, 107218983949152075, 2136610763952639975, 44868826043005439475, 986129980012277775675
Offset: 0

Views

Author

Vladeta Jovovic, Aug 06 2007

Keywords

Examples

			a(4)=21 because only the following three degree-4 permutations do not qualify: (12)(34), (13)(24) and (14)(23).
		

Crossrefs

Programs

  • Maple
    g:=sqrt((1+x)/(1-x))*(product(1+sinh(x^(2*k)/(2*k)),k=1..30)): gser:=series(g, x=0,25): seq(factorial(n)*coeff(gser,x,n),n=0..20); # Emeric Deutsch, Aug 24 2007
    # second Maple program:
    with(combinat):
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0, add(
          `if`(j=0 or irem(i, 2)=1 or irem(j, 2)=1, 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(n$2):
    seq(a(n), n=0..30);  # Alois P. Heinz, Mar 09 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[j == 0 || Mod[i, 2] == 1 || Mod[j, 2] == 1, multinomial[n, Join[{n - i*j}, Array[i &, j]]]*(i - 1)!^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, Dec 22 2016, after Alois P. Heinz *)

Formula

E.g.f.: sqrt((1+x)/(1-x))*Product_{k>0} (1+sinh(x^(2*k)/(2*k))).

Extensions

More terms from Emeric Deutsch, Aug 24 2007

A130276 Number of degree-2n permutations such that number of cycles of size 2k-1 is even (or zero) for every k.

Original entry on oeis.org

1, 2, 16, 416, 20224, 1645312, 196388864, 33279311872, 7427338829824, 2151276556845056, 771086221948223488, 340572557390992900096, 179222835344084459061248, 112158801651454395931426816, 81399358513573250066141937664, 68530340884909785149816189222912
Offset: 0

Views

Author

Vladeta Jovovic, Aug 06 2007

Keywords

Examples

			a(2)=16 because there are 8 permutations that do not qualify: (1)(234), (1)(243), (123)(4), (124)(3), (132)(4), (134)(2), (142)(3) and (143)(2).
		

Crossrefs

Programs

  • Maple
    g:=(product(cosh(x^(2*k-1)/(2*k-1)),k=1..30))/sqrt(1-x^2): gser:=series(g,x= 0,30): seq(factorial(2*n)*coeff(gser,x,2*n),n=0..13); # Emeric Deutsch, Aug 24 2007
    # second Maple program:
    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 or 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(2*n$2):
    seq(a(n), n=0..20);  # Alois P. Heinz, Mar 09 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[j == 0 || Mod[i, 2] == 0 || Mod[j, 2] == 0, multinomial[n, Join[{n - i*j}, Array[i &, j]]]*(i - 1)!^j/j!*b[n - i*j, i - 1], 0], {j, 0, n/i}]]]; a[n_] := b[2n, 2n]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Dec 22 2016, after Alois P. Heinz *)
  • PARI
    N=31; x='x+O('x^N);
    v0=Vec(serlaplace(1/sqrt(1-x^2)*prod(k=1,N, cosh(x^(2*k-1)/(2*k-1)))));
    vector(#v0\2,n,v0[2*n-1]) \\ Joerg Arndt, Jan 03 2011

Formula

E.g.f. with interleaved zeros: 1/sqrt(1-x^2)*Product_{k>=1} cosh(x^(2*k-1)/(2*k-1)). - Geoffrey Critzer, Jan 02 2011

Extensions

More terms from Emeric Deutsch, Aug 24 2007

A130278 Number of degree-n permutations such that number of cycles of size 2k-1 is odd (or zero) for every k.

Original entry on oeis.org

1, 1, 1, 6, 17, 100, 529, 3766, 31121, 276984, 2755553, 29665306, 364627801, 4639937380, 64952094401, 973467571350, 15750475301921, 264870218828656, 4759194994114369, 90124395399063730, 1812001488739061417, 37956199941196210716, 832297726351555617569
Offset: 0

Views

Author

Vladeta Jovovic, Aug 06 2007

Keywords

Examples

			a(4)=17 because only the following 7 permutations do not qualify: (1)(2)(3)(4), (1)(2)(34), (1)(23)(4), (1)(24)(3), (12)(3)(4), (13)(2)(4) and (14)(2)(3).
		

Crossrefs

Programs

  • Maple
    g:=(product(1+sinh(x^(2*k-1)/(2*k-1)),k=1..30))/sqrt(1-x^2): gser:=series(g,x =0,25): seq(factorial(n)*coeff(gser,x,n),n=0..20); # Emeric Deutsch, Aug 24 2007
    # second Maple program:
    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 or irem(j, 2)=1, 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(n$2):
    seq(a(n), n=0..30);  # Alois P. Heinz, Mar 09 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[j == 0 || Mod[i, 2] == 0 || Mod[j, 2] == 1, multinomial[n, Join[{n - i*j}, Array[i&, j]]]*(i - 1)!^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, Dec 22 2016, after Alois P. Heinz *)

Formula

E.g.f.: 1/sqrt(1-x^2)*Product_{k>0} (1+sinh(x^(2*k-1)/(2*k-1))).

Extensions

More terms from Emeric Deutsch, Aug 24 2007

A155510 Possible cardinalities of the set of all k-th powers of the order n permutations, where k and n are some positive integers.

Original entry on oeis.org

1, 2, 3, 4, 6, 9, 12, 16, 21, 24, 25, 36, 40, 45, 46, 56, 60, 80, 81, 96, 106, 120, 126, 145, 190, 225, 256, 270, 351, 400, 505, 576, 610, 666, 720, 721, 826, 855, 946, 1071, 1072, 1170, 1225, 1233, 1330, 1338, 1345, 1386, 1450, 1575, 1576, 1792, 1890, 2080, 2241
Offset: 1

Views

Author

Vladimir Letsko, Jan 23 2009

Keywords

Examples

			80 is in the sequence because the set {a^3|a in S_5} has 80 elements.
		

Crossrefs

Extensions

Corrected and extended by Max Alekseyev, Feb 08 2009
Some missing terms added by Max Alekseyev, Jan 24 2010

A214854 Number of n-permutations that have exactly two square roots.

Original entry on oeis.org

0, 0, 1, 0, 3, 35, 0, 714, 2835, 35307, 236880, 3342350, 28879158, 461911086, 4916519608, 87798024300, 1112716544355, 21957112744083, 322944848419392, 6986165252185782, 116941654550250258, 2754405555107729418, 51688464405692879688
Offset: 0

Views

Author

Geoffrey Critzer, Mar 08 2013

Keywords

Comments

These permutations are of two types: They are composed of exactly one pair of equal even size cycles with at most one fixed point and any number of odd (>=3) size cycles; OR they are any number of odd (>=3) size cycles with exactly two fixed points.

Examples

			a(5) = 35 because we have 20 5-permutations of the type (1,2,3)(4)(5) and 15 of the type (1,2)(3,4)(5). These have 2 square roots:(1,3,2)(4)(5),(1,3,2)(4,5) and (1,3,2,4)(5),(3,1,4,2)(5) respectively.
		

Crossrefs

Programs

  • Mathematica
    nn=22; a=Sum[Binomial[2n,n]/2x^(2n)/(2n)!, {n,2,nn,2}]; Range[0,nn]! CoefficientList[Series[(a(1+x)+x^2/2) ((1+x)/(1-x))^(1/2) Exp[-x], {x,0,nn}], x]

Formula

E.g.f.: (A(x)*(1+x)+x^2/2)*((1+x)/(1-x))^(1/2)*exp(-x) where A(x) = Sum_{n=2,4,6,8,...} Binomial(2n,n)/2 * x^(2n)/(2n)!

A247621 Decimal expansion of Sum_{k>=1} 1/(2*k)-tanh(1/(2*k)).

Original entry on oeis.org

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

Views

Author

Vaclav Kotesovec, Sep 21 2014

Keywords

Examples

			0.04615145130591420884656838354174674728274955974710537814789097038...
		

Crossrefs

Cf. A003483.

Programs

  • Maple
    evalf(sum(1/(2*k)-tanh(1/(2*k)), k=1..infinity), 120)
  • PARI
    default(realprecision,150); sumpos(k=1,(1/(2*k)-tanh(1/(2*k))))

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 *)
Previous Showing 11-20 of 22 results. Next