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.

A005225 Number of permutations of length n with equal cycles.

Original entry on oeis.org

1, 2, 3, 10, 25, 176, 721, 6406, 42561, 436402, 3628801, 48073796, 479001601, 7116730336, 88966701825, 1474541093026, 20922789888001, 400160588853026, 6402373705728001, 133991603578884052, 2457732174030848001, 55735573291977790576, 1124000727777607680001
Offset: 1

Views

Author

Keywords

Examples

			For example, a(4)=10 since, of the 24 permutations of length 4, there are 6 permutations with consist of a single 4-cycle, 3 permutations that consist of two 2-cycles and 1 permutation with four 1-cycles.
Also, a(7)=721 since there are 720 permutations with a single cycle of length 7 and 1 permutation with seven 1-cycles.
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • D. P. Walsh, A differentiation-based characterization of primes, Abstracts Amer. Math. Soc., 25 (No. 2, 2002), p. 339, #975-11-237.

Crossrefs

Column k=1 of A218868.
Column k=0 of A364967 (for n>=1).

Programs

  • Maple
    a:= n-> n!*add((d/n)^d/d!, d=numtheory[divisors](n)):
    seq(a(n), n=1..30);  # Alois P. Heinz, Nov 07 2012
  • Mathematica
    Table[n! Sum[((n/d)!*d^(n/d))^(-1), {d, Divisors[n]}], {n, 21}] (* Jean-François Alcover, Apr 04 2011 *)
  • Maxima
    a(n):= n!*lsum((d!*(n/d)^d)^(-1),d,listify(divisors(n)));
    makelist(a(n),n,1,40); /* Emanuele Munarini, Feb 03 2014 */

Formula

a(n) = n!*sum(((n/k)!*k^(n/k))^(-1)) where sum is over all divisors k of n. Exponential generating function [for a(1) through a(n)]= sum(exp(t^k/k)-1, k=1..n).
a(n) = (n-1)! + 1 iff n is a prime.

Extensions

Additional comments from Dennis P. Walsh, Dec 08 2000
More terms from Vladeta Jovovic, Dec 01 2001

A364971 Number T(n,k) of partitions of [n] for which the difference between the longest and the shortest block size 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, 2, 3, 5, 6, 4, 2, 35, 10, 5, 27, 60, 95, 15, 6, 2, 371, 315, 161, 21, 7, 142, 938, 2002, 770, 252, 28, 8, 282, 4005, 9744, 5313, 1386, 372, 36, 9, 1073, 16950, 50275, 33705, 11082, 2310, 525, 45, 10, 2, 74657, 283525, 217800, 78078, 20097, 3630, 715, 55, 11
Offset: 0

Views

Author

Alois P. Heinz, Aug 15 2023

Keywords

Comments

T(0,0) = 1 by convention.

Examples

			T(4,0) = 5: 1|2|3|4, 12|34, 13|24, 14|23, 1234.
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) = 4: 1|234, 123|4, 124|3, 134|2.
Triangle T(n,k) begins:
     1;
     1;
     2;
     2,     3;
     5,     6,     4;
     2,    35,    10,     5;
    27,    60,    95,    15,     6;
     2,   371,   315,   161,    21,    7;
   142,   938,  2002,   770,   252,   28,   8;
   282,  4005,  9744,  5313,  1386,  372,  36,  9;
  1073, 16950, 50275, 33705, 11082, 2310, 525, 45, 10;
  ...
		

Crossrefs

Row sums give A000110.
Column k=0 gives A038041 (for n>=1).
T(n,n-2) gives A000027 (for n>=2).

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..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, n}]];
    T[n_] := CoefficientList[b[n, n, 0], x];
    Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Oct 27 2023, after Alois P. Heinz *)

A365229 Sum over all k of 1/k! times the number of permutations of [n] for which the difference between the longest and the shortest cycle length is k.

Original entry on oeis.org

1, 1, 2, 6, 20, 85, 382, 2219, 13624, 100293, 811914, 7594015, 74507490, 862987151, 10327793088, 139175089681, 1966790900028, 30983071424315, 496696984054286, 8925920862110603, 162253809011669330, 3228438870635420315, 65677024568975412036, 1448358661756969370985
Offset: 0

Views

Author

Alois P. Heinz, Aug 27 2023

Keywords

Comments

a(0) = 1 by convention.

Crossrefs

Programs

  • Maple
    b:= proc(n, l, m) option remember; `if`(n=0, 1/(m-l)!, add((j-1)!
          *b(n-j, min(l, j), max(m, j))*binomial(n-1, j-1), j=1..n))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..23);

Formula

a(n) = Sum_{k=0..max(0,n-2)} A364967(n,k)/k!.
a(n) mod 2 = A000035(n) for n>=4.
Showing 1-3 of 3 results.