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

A346057 Expansion of e.g.f. Product_{k>=1} exp(1 - exp(x^k/k)).

Original entry on oeis.org

1, -1, -1, 2, 3, 14, -55, 62, -637, 338, -3861, 335312, -4499803, 43490108, -246353731, 2189950310, -47336985225, 1224524919590, -21516426400621, 346681988108648, -4499477383730851, 69294602646065900, -1418045089870455795, 45246859024830444566
Offset: 0

Views

Author

Seiichi Manyama, Jul 02 2021

Keywords

Crossrefs

Programs

  • PARI
    my(N=40, x='x+O('x^N)); Vec(serlaplace(prod(k=1, N, exp(1-exp(x^k/k)))))
    
  • PARI
    my(N=40, x='x+O('x^N)); Vec(serlaplace(exp(sum(k=1, N, 1-exp(x^k/k)))))
    
  • PARI
    my(N=40, x='x+O('x^N)); Vec(serlaplace(exp(-sum(k=1, N, sumdiv(k, d, 1/(d!*(k/d)^d))*x^k))))
    
  • PARI
    a(n) = if(n==0, 1, -(n-1)!*sum(k=1, n, k*sumdiv(k, d, 1/(d!*(k/d)^d))*a(n-k)/(n-k)!));

Formula

E.g.f.: exp( Sum_{k>=1} (1 - exp(x^k/k)) ).
E.g.f.: exp( -Sum_{k>=1} A005225(k)*x^k/k! ).
a(n) = -(n-1)! * Sum_{k=1..n} k * (Sum_{d|k} 1/(d! * (k/d)^d)) * a(n-k)/(n-k)! for n > 0.

A364967 Number T(n,k) of permutations of [n] for which the difference between the longest and the shortest cycle length is k; triangle T(n,k), n>=0, 0<=k<=max(0,n-2), read by rows.

Original entry on oeis.org

1, 1, 2, 3, 3, 10, 6, 8, 25, 45, 20, 30, 176, 60, 250, 90, 144, 721, 861, 770, 1344, 504, 840, 6406, 1778, 7980, 6300, 8736, 3360, 5760, 42561, 23283, 38808, 75348, 45360, 66240, 25920, 45360, 436402, 84150, 363680, 456120, 708048, 378000, 572400, 226800, 403200
Offset: 0

Views

Author

Alois P. Heinz, Aug 14 2023

Keywords

Comments

T(0,0) = 1 by convention.

Examples

			T(4,0) = 10: (1)(2)(3)(4), (12)(34), (13)(24), (14)(23), (1234), (1243), (1324), (1342), (1423), (1432).
T(4,1) = 6: (1)(2)(34), (1)(23)(4), (1)(24)(3), (12)(3)(4), (13)(2)(4), (14)(2)(3).
T(4,2) = 8: (1)(234), (1)(243), (123)(4), (132)(4), (124)(3), (142)(3), (134)(2), (143)(2).
Triangle T(n,k) begins:
      1;
      1;
      2;
      3,     3;
     10,     6,     8;
     25,    45,    20,    30;
    176,    60,   250,    90,   144;
    721,   861,   770,  1344,   504,   840;
   6406,  1778,  7980,  6300,  8736,  3360,  5760;
  42561, 23283, 38808, 75348, 45360, 66240, 25920, 45360;
  ...
		

Crossrefs

Row sums give A000142.
Column k=0 gives A005225 (for n>=1).
T(n+1,n-1) gives A001048(n) (for n>=1).

Programs

  • Maple
    b:= proc(n, l, m) option remember; `if`(n=0, x^(m-l), add(
         b(n-j, min(l, j), max(m, j))*binomial(n-1, j-1)*(j-1)!, j=1..n))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2, 0)):
    seq(T(n), n=0..12);
  • Mathematica
    b[n_, l_, m_] := b[n, l, m] = If[n == 0, x^(m - l), Sum[b[n - j, Min[l, j], Max[m, j]]*Binomial[n - 1, j - 1]*(j - 1)!, {j, 1, n}]];
    T[n_] := CoefficientList[b[n, n, 0], x];
    Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Dec 08 2023, after Alois P. Heinz *)

Formula

T(n,k) == 0 (mod k!).
Sum_{k=0..max(0,n-2)} T(n,k)/k! = A365229(n).

A087905 a(n) = n! * Sum_{d|n} (d/n)^d.

Original entry on oeis.org

1, 3, 8, 36, 144, 1010, 5760, 50400, 416640, 4250232, 43545600, 553106400, 6706022400, 95865541200, 1410695430144, 22720842144000, 376610217984000, 6888030445296000, 128047474114560000, 2587520533615041024
Offset: 1

Views

Author

Vladeta Jovovic, Oct 14 2003

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_]:= n!*DivisorSum[n, (#/n)^# &]; Array[a, 50] (* G. C. Greubel, May 16 2018 *)
  • PARI
    {a(n)= n!*sumdiv(n, d, (d/n)^d)};
    for(n=1, 30, print1(a(n), ", ")) \\ G. C. Greubel, May 16 2018

Formula

E.g.f.: Sum_{k>0} x^k/(k-x^k).

A317329 Number of permutations of [n] with equal lengths of increasing runs.

Original entry on oeis.org

1, 2, 2, 7, 2, 82, 2, 1456, 1515, 50774, 2, 3052874, 2, 199364414, 136835794, 19451901825, 2, 2510158074714, 2, 370671075758054, 132705620239756, 69348874393843334, 2, 15772160279898993782, 613498040952503, 4087072509293134292962, 705927677748508225534
Offset: 1

Views

Author

Alois P. Heinz, Jul 25 2018

Keywords

Examples

			a(4) = 7: 1234, 1324, 1423, 2314, 2413, 3412, 4321.
		

Crossrefs

Column k=1 of A317327.

Programs

  • Maple
    b:= proc(u, o, t, d) option remember; `if`(u+o=0, 1,
          `if`(t=d, add(b(u-j, o+j-1, 1, d), j=1..u),
           add(b(u+j-1, o-j, t+1, d), j=1..o)))
        end:
    a:= proc(n) option remember; `if`(n=1, 1, 2+add(
          b(n, 0, d$2), d=numtheory[divisors](n) minus {1, n}))
        end:
    seq(a(n), n=1..35);
  • Mathematica
    b[u_, o_, t_, d_] := b[u, o, t, d] = If[u + o == 0, 1,
         If[t == d, Sum[b[u - j, o + j - 1, 1, d], {j, 1, u}],
         Sum[b[u + j - 1, o - j, t + 1, d], {j, 1, o}]]];
    a[n_] := a[n] = If[n == 1, 1, 2 + Sum[b[n, 0, d, d], {d, Divisors[n] ~Complement~ {1, n}}]];
    Array[a, 35] (* Jean-François Alcover, Aug 01 2021, after Alois P. Heinz *)

Formula

a(n) = 2 <=> n in { A000040 }.

A133118 Number of partitions of n-set with 3 block sizes.

Original entry on oeis.org

60, 315, 2268, 14742, 72180, 464640, 2676366, 16400098, 94209206, 673282610, 4095231104, 29371828846, 197547348216, 1513916607683, 10904464442572, 87070803499372, 673555061736062, 5718121102062336, 47028289679340734, 418812093667530755, 3680961843042545490, 34161428275433710485
Offset: 6

Views

Author

Vladeta Jovovic, Sep 18 2007

Keywords

Crossrefs

Column k=3 of A208437.

Programs

  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!);
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, Sum[multinomial[n, Prepend[Table[i, {j}], n - i*j]]/j!*b[n - i*j, i - 1]*If[j == 0, 1, x], {j, 0, n/i}]]];
    a[n_] := Coefficient[b[n, n], x, 3];
    Array[a, 22, 6] (* Jean-François Alcover, May 24 2019, after Alois P. Heinz in A208437 *)

Formula

We obtain e.g.f. for number of partitions of n-set with m block sizes if we substitute x(i) with -Sum_{k>0} (1-exp(x^k/k!))^i in cycle index Z(S(m); x(1),x(2),...,x(n)) of symmetric group S(m) of degree m.

Extensions

More terms from Max Alekseyev, Jun 17 2011

A133119 Number of permutations of [n] with 3 cycle lengths.

Original entry on oeis.org

120, 1050, 12712, 141876, 1418400, 17061660, 212254548, 2735287698, 37354035628, 581350330470, 8895742806480, 151305163230480, 2659183039338192, 50112909523522476, 976443721325014300, 20413628375979803370, 434137453618439716068
Offset: 6

Views

Author

Vladeta Jovovic, Sep 18 2007

Keywords

Crossrefs

Column k=3 of A218868.

Formula

We obtain e.g.f. for number of permutations of [n] with m cycle lengths if we substitute x(i) with -Sum_{k>0} ((1-exp(x^k/k))^i in cycle index Z(S(m); x(1),x(2),..,x(m)) of symmetric group S(m) of degree m.

Extensions

More terms from Max Alekseyev, Feb 08 2010

A359951 Number of permutations of [n] such that the GCD of the cycle lengths is a prime.

Original entry on oeis.org

0, 0, 1, 2, 3, 24, 145, 720, 4725, 22400, 602721, 3628800, 67692625, 479001600, 12924021825, 103953833984, 2116670180625, 20922789888000, 959231402754625, 6402373705728000, 257071215652932681, 3242340687872000000, 142597230222616430625, 1124000727777607680000
Offset: 0

Views

Author

Alois P. Heinz, Jan 19 2023

Keywords

Examples

			a(2) = 1: (12).
a(3) = 2: (123), (132).
a(4) = 3: (12)(34), (13)(24), (14)(23).
a(5) = 24: (12345), (12354), (12435), (12453), (12534), (12543), (13245), (13254), (13425), (13452), (13524), (13542), (14235), (14253), (14325), (14352), (14523), (14532), (15234), (15243), (15324), (15342), (15423), (15432).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, g) option remember; `if`(n=0, `if`(isprime(g), 1, 0),
          add(b(n-j, igcd(j, g))*(n-1)!/(n-j)!, j=1..n))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..23);
  • Mathematica
    b[n_, g_] := b[n, g] = If[n == 0, If[PrimeQ[g], 1, 0], Sum[b[n - j, GCD[j, g]]*(n - 1)!/(n - j)!, {j, 1, n}]];
    a[n_] := b[n, 0];
    Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Dec 13 2023, after Alois P. Heinz *)

Formula

a(n) = Sum_{prime p <= n} A346085(n,p).
a(p) = (p-1)! for prime p.

A368213 Triangular array read by rows: Number of permutations of [n] that factor into exactly k-cycles, ordered by n (rows) and divisors k of n (columns).

Original entry on oeis.org

1, 1, 1, 1, 0, 2, 1, 3, 0, 6, 1, 0, 0, 0, 24, 1, 15, 40, 0, 0, 120, 1, 0, 0, 0, 0, 0, 720, 1, 105, 0, 1260, 0, 0, 0, 5040, 1, 0, 2240, 0, 0, 0, 0, 0, 40320, 1, 945, 0, 0, 72576, 0, 0, 0, 0, 362880, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3628800, 1, 10395, 246400, 1247400, 0, 6652800, 0, 0, 0, 0, 0, 39916800
Offset: 1

Views

Author

Marko Riedel, Dec 17 2023

Keywords

Examples

			Row n=6 is 1, 15, 40, 120 because there is one permutation of [6] consisting of six fixed points, there are 15 permutations consisting of three transpositions, there are forty permutations consisting of two three-cycles and there are one hundred and twenty permutations consisting of just one six-cycle (6!/6).
Triangular array starts:
[ 1] 1;
[ 2] 1,   1;
[ 3] 1,   0,    2;
[ 4] 1,   3,    0,    6;
[ 5] 1,   0,    0,    0,    24;
[ 6] 1,  15,   40,    0,     0, 120;
[ 7] 1,   0,    0,    0,     0,   0, 720;
[ 8] 1, 105,    0, 1260,     0,   0,   0, 5040;
[ 9] 1,   0, 2240,    0,     0,   0,   0,    0, 40320;
[10] 1, 945,    0,    0, 72576,   0,   0,    0,     0, 362880;
		

References

  • P. Flajolet and R. Sedgewick, Analytic Combinatorics, Cambridge University Press, 2009, pages 120-122.

Crossrefs

Cf. A005225 (row sums), A008290.
Cf. A123023 (column 2), A052502 (column 3), A060706 (column 4).

Programs

  • Maple
    T:= (n, m)-> `if`(irem(n,m)=0, n!/m^(n/m)/(n/m)!, 0):
    seq(seq(T(n, m), m = 1..n), n=1..15);
  • Mathematica
    A368213[n_,k_]:=If[Divisible[n,k],n!/(k^(n/k)(n/k)!),0];
    Table[A368213[n,k],{n,15},{k,n}] (* Paolo Xausa, Dec 18 2023 *)
  • SageMath
    def T(n, d): return factorial(n) // (d ** (n//d) * factorial(n//d))
    for n in range(1, 19):
        print([T(n, d) if n % d == 0 else 0 for d in range(1, n+1)])
    # Peter Luschny, Dec 17 2023

Formula

T(n, k) = n! / ( k^(n/k) * (n/k)! ) if k divides n otherwise 0.

A370602 a(n) = n! * Sum_{d|n} 1/((d-1)! * (n/d)^(d-1)).

Original entry on oeis.org

1, 4, 9, 40, 125, 1056, 5047, 51248, 383049, 4364020, 39916811, 576885552, 6227020813, 99634224704, 1334500527375, 23592657488416, 355687428096017, 7202890599354468, 121645100408832019, 2679832071577681040, 51612375654647808021, 1226182612423511392672
Offset: 1

Views

Author

Seiichi Manyama, Feb 23 2024

Keywords

Crossrefs

Programs

  • PARI
    a(n) = n!*sumdiv(n, d, 1/((d-1)!*(n/d)^(d-1)));
    
  • PARI
    my(N=30, x='x+O('x^N)); Vec(serlaplace(sum(k=1, N, x^k*exp(x^k/k))))

Formula

a(n) = n * A005225(n).
If p is prime, a(p) = p + p!.
E.g.f.: Sum_{k>0} x^k * exp(x^k/k).

A343576 Number of permutations of [n] without fixed points and all cycles equal length.

Original entry on oeis.org

1, 0, 1, 2, 9, 24, 175, 720, 6405, 42560, 436401, 3628800, 48073795, 479001600, 7116730335, 88966701824, 1474541093025, 20922789888000, 400160588853025, 6402373705728000, 133991603578884051, 2457732174030848000, 55735573291977790575, 1124000727777607680000
Offset: 0

Views

Author

Gary Yane, Apr 20 2021

Keywords

Examples

			a(4) = 9: (1,2)(3,4), (1,3)(2,4), (1,4)(2,3), (2,3,4,1), (2,4,1,3), (3,1,4,2), (3,4,2,1), (4,1,2,3), (4,3,1,2).
		

Crossrefs

Programs

  • Maple
    a:= n-> `if`(n=0, 1, add(n!/d!*(d/n)^d, d=numtheory[divisors](n) minus {n})):
    seq(a(n), n=0..23);  # Alois P. Heinz, Apr 20 2021
  • PARI
    a(n) = if (n, sumdiv(n, d, if (dMichel Marcus, Apr 21 2021

Formula

a(n) = Sum_{d|n, d0, a(0) = 1.
a(n) = A261431(n) for n in { A000040, A001358 }.
Previous Showing 11-20 of 21 results. Next