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

A000793 Landau's function g(n): largest order of permutation of n elements. Equivalently, largest LCM of partitions of n.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 6, 12, 15, 20, 30, 30, 60, 60, 84, 105, 140, 210, 210, 420, 420, 420, 420, 840, 840, 1260, 1260, 1540, 2310, 2520, 4620, 4620, 5460, 5460, 9240, 9240, 13860, 13860, 16380, 16380, 27720, 30030, 32760, 60060, 60060, 60060, 60060, 120120
Offset: 0

Views

Author

Keywords

Comments

Also the largest orbit size (cycle length) for the permutation A057511 acting on Catalan objects (e.g., planar rooted trees, parenthesizations). - Antti Karttunen, Sep 07 2000
Grantham mentions that he computed a(n) for n <= 500000.
An easy lower bound is a(n) >= A002110(max{ m | A007504(m) <= n}), with strict inequality if n is not in A007504 (sum of the first m primes). Indeed, if A007504(m) <= n, the partition of n into the first m primes and maybe one additional term will have an LCM greater than or equal to primorial(m). If n > A007504(m) then a(n) >= (3/2)*A002110(m) by replacing the initial 2 by 3. But even for n = A007504(m), one has a(n) > A002110(m) for m > 8, since replacing 2+23 in 2+3+5+7+11+13+17+19+23 by 16+9, one has an LCM of 8*3*primorial(8) > primorial(9) because 24 > 23. - M. F. Hasler, Mar 29 2015
Maximum degree of the splitting field of a polynomial of degree n over a finite field, since over a finite field the degree of the splitting field is the least common multiple of the degrees of the irreducible polynomial factors of the polynomial. - Charles R Greathouse IV, Apr 27 2015
Maximum order of the elements in the symmetric group S_n. - Jianing Song, Dec 12 2021

Examples

			G.f. = 1 + x + 2*x^2 + 3*x^3 + 4*x^4 + 6*x^5 + 6*x^6 + 12*x^7 + 15*x^8 + ...
From _Joerg Arndt_, Feb 15 2013: (Start)
The 15 partitions of 7 are the following:
[ #]  [ partition ]   lcm( parts )
[ 1]  [ 1 1 1 1 1 1 1 ]   1
[ 2]  [ 1 1 1 1 1 2 ]   2
[ 3]  [ 1 1 1 1 3 ]   3
[ 4]  [ 1 1 1 2 2 ]   2
[ 5]  [ 1 1 1 4 ]   4
[ 6]  [ 1 1 2 3 ]   6
[ 7]  [ 1 1 5 ]   5
[ 8]  [ 1 2 2 2 ]   2
[ 9]  [ 1 2 4 ]   4
[10]  [ 1 3 3 ]   3
[11]  [ 1 6 ]   6
[12]  [ 2 2 3 ]   6
[13]  [ 2 5 ]  10
[14]  [ 3 4 ]  12  (max)
[15]  [ 7 ]   7
The maximum (LCM) value attained is 12, so a(7) = 12.
(End)
		

References

  • J. Haack, "The Mathematics of Steve Reich's Clapping Music," in Bridges: Mathematical Connections in Art, Music and Science: Conference Proceedings, 1998, Reza Sarhangi (ed.), 87-92.
  • Edmund Georg Hermann Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Chelsea Publishing, NY 1953, p. 223.
  • J.-L. Nicolas, On Landau's function g(n), pp. 228-240 of R. L. Graham et al., eds., Mathematics of Paul Erdős I.
  • S. M. Shah, An inequality for the arithmetical function g(x), J. Indian Math. Soc., 3 (1939), 316-318. [See below for a scan of the first page.]
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a000793 = maximum . map (foldl lcm 1) . partitions where
       partitions n = ps 1 n where
          ps x 0 = [[]]
          ps x y = [t:ts | t <- [x..y], ts <- ps t (y - t)]
    -- Reinhard Zumkeller, Mar 29 2015
    
  • Maple
    A000793 := proc(n)
        l := 1:
        p := combinat[partition](n):
        for i from 1 to combinat[numbpart](n) do
            if ilcm( p[i][j] $ j=1..nops(p[i])) > l then
                l := ilcm( p[i][j] $ j=1..nops(p[i]))
            end if:
        end do:
        l ;
    end proc:
    seq(A000793(n),n=0..30) ; # James Sellers, Dec 07 2000
    seq( max( op( map( x->ilcm(op(x)), combinat[partition](n)))), n=0..30); # David Radcliffe, Feb 28 2006
    # third Maple program:
    b:= proc(n, i) option remember; local p;
          p:= `if`(i<1, 1, ithprime(i));
          `if`(n=0 or i<1, 1, max(b(n, i-1),
               seq(p^j*b(n-p^j, i-1), j=1..ilog[p](n))))
        end:
    a:=n->b(n, `if`(n<8, 3, numtheory[pi](ceil(1.328*isqrt(n*ilog(n)))))):
    seq(a(n), n=0..60);  # Alois P. Heinz, Feb 16 2013
  • Mathematica
    f[n_] := Max@ Apply[LCM, IntegerPartitions@ n, 1]; Array[f, 47] (* Robert G. Wilson v, Oct 23 2011 *)
    b[n_, i_] := b[n, i] = Module[{p}, p = If[i<1, 1, Prime[i]]; If[n == 0 || i<1, 1, Max[b[n, i-1], Table[p^j*b[n-p^j, i-1], {j, 1, Log[p, n] // Floor}]]]]; a[n_] := b[n, If[n<8, 3, PrimePi[Ceiling[1.328*Sqrt[n*Log[n] // Floor]]]]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Mar 07 2014, after Alois P. Heinz *)
  • PARI
    {a(n) = my(m, t, j, u); if( n<2, n>=0, m = ceil(n / exp(1)); t = ceil( (n/m)^m ); j=1; for( i=2, t, u = factor(i); u = sum( k=1, matsize(u)[1], u[k,1]^u[k,2]); if( u<=n, j=i)); j)}; /* Michael Somos, Oct 20 2004 */
    
  • PARI
    c=0;A793=apply(t->eval(concat(Vec(t)[#Str(c++) .. -1])),select(t->#t,readstr("/tmp/b000793.txt")));A000793(n)=A793[n+1] \\ Assumes the b-file in the /tmp (or C:\tmp) folder. - M. F. Hasler, Mar 29 2015
    
  • PARI
    A008475(n)=my(f=factor(n)); sum(i=1,#f~,f[i,1]^f[i,2]);
    a(n)=
    {
      if(n<2, return(1));
      forstep(i=ceil(exp(1.05315*sqrt(log(n)*n))), 2, -1,
        if(A008475(i)<=n, return(i))
      );
      1;
    } \\ Charles R Greathouse IV, Apr 28 2015
    
  • PARI
    { \\ translated from code given by Tomas Rokicki
      my( N = 100 );
      my( V = vector(N,j,1) );
       forprime (i=2, N,  \\ primes i
          forstep (j=N, i,  -1,
             my( hi = V[j] );
             my( pp = i );  \\ powers of prime i
             while ( pp<=j,  \\ V[] is 1-based
                 hi = max(if(j==pp, pp, V[j-pp]*pp), hi);
                 pp *= i;
             );
             V[j] = hi;
          );
       );
       print( V );  \\ all values
    \\   print( V[N] );  \\ just a(N)
    \\  print("0 1");  for (n=1, N, print(n, " ", V[n]) );  \\ b-file
    } \\ Joerg Arndt, Nov 14 2016
    
  • PARI
    {a(n) = my(m=1); if( n<0, 0, forpart(v=n, m = max(m, lcm(Vec(v)))); m)}; /* Michael Somos, Sep 04 2017 */
    
  • Python
    from sympy import primerange
    def aupton(N): # compute terms a(0)..a(N)
        V = [1 for j in range(N+1)]
        for i in primerange(2, N+1):
            for j in range(N, i-1, -1):
                hi = V[j]
                pp = i
                while pp <= j:
                    hi = max((pp if j==pp else V[j-pp]*pp), hi)
                    pp *= i
                V[j] = hi
        return V
    print(aupton(47)) # Michael S. Branicky, Oct 09 2022 after Joerg Arndt
    
  • Python
    from sympy import primerange,sqrt,log,Rational
    def f(N): # compute terms a(0)..a(N)
        V = [1 for j in range(N+1)]
        if N < 4:
            C = 2
        else:
            C = Rational(166,125)
        for i in primerange(C*sqrt(N*log(N))):
            for j in range(N, i-1, -1):
                hi = V[j]
                pp = i
                while pp <= j:
                    hi = max(V[j-pp]*pp, hi)
                    pp *= i
                V[j] = hi
        return V
    # Philip Turecek, Mar 31 2023
    
  • Sage
    def a(n):
      return max([lcm(l) for l in Partitions(n)])
    # Philip Turecek, Mar 28 2023
  • Scheme
    ;; A naive algorithm searching through all partitions of n:
    (define (A000793 n) (let ((maxlcm (list 0))) (fold_over_partitions_of n 1 lcm (lambda (p) (set-car! maxlcm (max (car maxlcm) p)))) (car maxlcm)))
    (define (fold_over_partitions_of m initval addpartfun colfun) (let recurse ((m m) (b m) (n 0) (partition initval)) (cond ((zero? m) (colfun partition)) (else (let loop ((i 1)) (recurse (- m i) i (+ 1 n) (addpartfun i partition)) (if (< i (min b m)) (loop (+ 1 i))))))))
    ;; From Antti Karttunen, May 17 2013.
    

Formula

Landau: lim_{n->oo} (log a(n)) / sqrt(n log n) = 1.
For bounds, see the Shah and Massias references.
For n >= 2, a(n) = max_{k} A008475(k) <= n. - Joerg Arndt, Nov 13 2016

Extensions

More terms from David W. Wilson
Removed erroneous comment about a(16) which probably originated from misreading a(15)=105 as a(16) because of offset=0: a(16) = 4*5*7 = 140 is correct as it stands. - M. F. Hasler, Feb 02 2009

A001189 Number of degree-n permutations of order exactly 2.

Original entry on oeis.org

0, 1, 3, 9, 25, 75, 231, 763, 2619, 9495, 35695, 140151, 568503, 2390479, 10349535, 46206735, 211799311, 997313823, 4809701439, 23758664095, 119952692895, 618884638911, 3257843882623, 17492190577599, 95680443760575, 532985208200575, 3020676745975551
Offset: 1

Views

Author

Keywords

Comments

Number of set partitions of [n] into blocks of size 2 and 1 with at least one block of size 2. - Olivier Gérard, Oct 29 2007
For n>=2, number of standard Young tableaux with height <= n - 1. That is, all tableaux (A000085) but the one with just one column. - Joerg Arndt, Oct 24 2012

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column k=1 of A143911, column k=2 of A080510, A182222. - Alois P. Heinz, Oct 24 2012
Column k=2 of A057731. - Alois P. Heinz, Feb 14 2013

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( Exp(x + x^2/2) -Exp(x) )); [0] cat [Factorial(n+1)*b[n]: n in [1..m-2]]; // G. C. Greubel, May 14 2019
    
  • Maple
    a:= proc(n) option remember; `if`(n<3, [0$2, 1][n+1],
          a(n-1) +(n-1) *(1+a(n-2)))
        end:
    seq(a(n), n=1..30);  # Alois P. Heinz, Oct 24 2012
    # alternative:
    A001189 := proc(n)
        local a,prs,p,k ;
        a := 0 ;
        for prs from 1 to n/2 do
            p := product(binomial(n-2*k,2),k=0..prs-1) ;
            a := a+p/prs!;
        end do:
        a;
    end proc:
    seq(A001189(n),n=1..13) ; # R. J. Mathar, Jan 04 2017
  • Mathematica
    RecurrenceTable[{a[1]==0,a[2]==1,a[n]==a[n-1]+(1+a[n-2])(n-1)},a[n],{n,25}] (* Harvey P. Dale, Jul 27 2011 *)
  • PARI
    {a(n) = sum(j=1,floor(n/2), n!/(j!*(n-2*j)!*2^j))}; \\ G. C. Greubel, May 14 2019
    
  • Sage
    m = 30; T = taylor(exp(x +x^2/2) - exp(x), x, 0, m); a=[factorial(n)*T.coefficient(x, n) for n in (0..m)]; a[1:] # G. C. Greubel, May 14 2019

Formula

E.g.f.: exp(x + x^2/2) - exp(x).
a(n) = A000085(n) - 1.
a(n) = b(n, 2), where b(n, d)=Sum_{k=1..n} (n-1)!/(n-k)! * Sum_{l:lcm{k, l}=d} b(n-k, l), b(0, 1)=1 is the number of degree-n permutations of order exactly d.
From Henry Bottomley, May 03 2001: (Start)
a(n) = a(n-1) + (1 + a(n-2))*(n-1).
a(n) = Sum_{j=1..floor(n/2)} n!/(j!*(n-2*j)!*(2^j)). (End)

A001471 Number of degree-n permutations of order exactly 3.

Original entry on oeis.org

0, 0, 0, 2, 8, 20, 80, 350, 1232, 5768, 31040, 142010, 776600, 4874012, 27027728, 168369110, 1191911840, 7678566800, 53474964992, 418199988338, 3044269834280, 23364756531620, 199008751634000, 1605461415071822
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of non-symmetric permutation matrices A of dimension n such that A^2 is the transpose of A. - Torlach Rush, Jul 09 2020

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( Exp(x + x^3/3) )); [Factorial(n-1)*b[n]-1: n in [1..m]]; // G. C. Greubel, May 14 2019
    
  • Mathematica
    a[n_] := HypergeometricPFQ[{1/3-n/3, 2/3-n/3, -n/3}, {}, -9] - 1; Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Oct 19 2011 *)
    nxt[{n_,a_,b_,c_}]:={n+1,b,c,c+(1+a)(n-1)(n-2)}; NestList[nxt,{3,0,0,0},25][[;;,2]] (* Harvey P. Dale, Mar 09 2024 *)
  • PARI
    a(n)=sum(j=1,n\3, n!/(j!*(n-3*j)!*(3^j))) \\ Charles R Greathouse IV, Jun 21 2017
    
  • PARI
    first(n)=my(v=vector(n+1)); for(i=3,n, v[i+1]=v[i] + (1+v[i-2])*(i-1)*(i-2)); v \\ Charles R Greathouse IV, Jul 10 2020
    
  • Sage
    m = 30; T = taylor(exp(x + x^3/3) -exp(x), x, 0, m); [factorial(n)*T.coefficient(x, n) for n in (0..m)] # G. C. Greubel, May 14 2019

Formula

From Henry Bottomley, Jan 26 2001: (Start)
a(n) = a(n-1) + (1 + a(n-3))*(n-1)(n-2).
a(n) = Sum_{j=1..floor(n/3)} n!/(j!*(n-3*j)!*(3^j)).
a(n) = A001470(n) - 1. (End)
E.g.f.: exp(x + x^3/3) - exp(x).

A001473 Number of degree-n permutations of order exactly 4.

Original entry on oeis.org

0, 0, 0, 6, 30, 180, 840, 5460, 30996, 209160, 1290960, 9753480, 69618120, 571627056, 4443697440, 40027718640, 346953934320, 3369416698080, 31421601510336, 328430320909920, 3331475969159520, 37124416523261760
Offset: 1

Views

Author

Keywords

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( Exp(x + x^2/2 +x^4/4) -Exp(x+x^2/2) )); [0,0,0] cat [Factorial(n+3)*b[n]: n in [1..m-4]]; // G. C. Greubel, May 14 2019
    
  • Mathematica
    Rest@With[{m = 30}, CoefficientList[Series[Exp[x +x^2/2 +x^4/4] - Exp[x +x^2/2], {x, 0, m}], x]*Range[0, m]!] (* G. C. Greubel, May 14 2019 *)
  • PARI
    my(x=xx+O(xx^33)); concat([0,0,0], Vec(serlaplace(-exp(x+1/2*x^2) +exp(x+1/2*x^2+1/4*x^4)))) \\ Michel Marcus, Dec 12 2014
    
  • Sage
    m = 30; T = taylor(exp(x +x^2/2 +x^4/4) - exp(x+x^2/2), x, 0, m); a=[factorial(n)*T.coefficient(x, n) for n in (0..m)]; a[1:] # G. C. Greubel, May 14 2019

Formula

E.g.f.: exp(x + x^2/2 + x^4/4) - exp(x + x^2/2).

Extensions

More terms from Vladeta Jovovic, Apr 14 2001

A222029 Triangle of number of functions in a size n set for which the sequence of composition powers ends in a length k cycle.

Original entry on oeis.org

1, 1, 3, 1, 16, 9, 2, 125, 93, 32, 6, 1296, 1155, 480, 150, 24, 20, 16807, 17025, 7880, 3240, 864, 840, 262144, 292383, 145320, 71610, 24192, 26250, 720, 0, 0, 504, 0, 420, 4782969, 5752131, 3009888, 1692180, 653184, 773920, 46080, 5040, 0, 32256, 0, 26880, 0, 0, 2688
Offset: 0

Views

Author

Chad Brewbaker, May 14 2013

Keywords

Comments

If you take the powers of a finite function you generate a lollipop graph. This table organizes the lollipops by cycle size. The table organized by total lollipop size with the tail included is A225725.
Warning: For T(n,k) after the sixth row there are zero entries and k can be greater than n: T(7,k) = |{1=>262144, 2=>292383, 3=>145320, 4=>71610, 5=>24192, 6=>26250, 7=>720, 8=>0, 9=>0, 10=>504, 11=>0, 12=>420}|.

Examples

			T(1,1) = |{[0]}|, T(2,1) = |{[0,0],[0,1],[1,1]}|, T(2,2) = |{[0,1]}|.
Triangle starts:
       1;
       1;
       3,      1;
      16,      9,      2;
     125,     93,     32,     6;
    1296,   1155,    480,   150,    24,    20;
   16807,  17025,   7880,  3240,   864,   840;
  262144, 292383, 145320, 71610, 24192, 26250, 720, 0, 0, 504, 0, 420;
  ...
		

Crossrefs

Rows sums give A000312.
Row lengths are A000793.
Number of nonzero elements of rows give A009490.
Last elements of rows give A162682.
Main diagonal gives A290961.
Cf. A057731 (the same for permutations), A290932.

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0, x^m, add((j-1)!*
          b(n-j, ilcm(m, j))*binomial(n-1, j-1), j=1..n))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(add(
             b(j, 1)*n^(n-j)*binomial(n-1, j-1), j=0..n)):
    seq(T(n), n=0..10);  # Alois P. Heinz, Aug 14 2017
  • Mathematica
    b[n_, m_]:=b[n, m]=If[n==0, x^m, Sum[(j - 1)!*b[n - j, LCM[m, j]] Binomial[n - 1, j - 1], {j, n}]]; T[n_]:=If[n==0, {1}, Drop[CoefficientList[Sum[b[j, 1]n^(n - j)*Binomial[n - 1, j - 1], {j, 0, n}], x], 1]]; Table[T[n], {n, 0, 10}]//Flatten (* Indranil Ghosh, Aug 17 2017 *)
  • Python
    from sympy.core.cache import cacheit
    from sympy import binomial, Symbol, lcm, factorial as f, Poly, flatten
    x=Symbol('x')
    @cacheit
    def b(n, m): return x**m if n==0 else sum([f(j - 1)*b(n - j, lcm(m, j))*binomial(n - 1, j - 1) for j in range(1, n + 1)])
    def T(n): return Poly(sum([b(j, 1)*n**(n - j)*binomial(n - 1, j - 1) for j in range(n + 1)]),x).all_coeffs()[::-1][1:]
    print([T(n) for n in range(11)]) # Indranil Ghosh, Aug 17 2017

Formula

Sum_{k=1..A000793(n)} k * T(n,k) = A290932. - Alois P. Heinz, Aug 14 2017

Extensions

T(0,1)=1 prepended by Alois P. Heinz, Aug 14 2017

A060014 Sum of orders of all permutations of n letters.

Original entry on oeis.org

1, 1, 3, 13, 67, 471, 3271, 31333, 299223, 3291487, 39020911, 543960561, 7466726983, 118551513523, 1917378505407, 32405299019941, 608246253790591, 12219834139189263, 253767339725277823, 5591088918313739017, 126036990829657056711, 2956563745611392385211
Offset: 0

Views

Author

N. J. A. Sloane, Mar 17 2001

Keywords

Comments

Conjecture: This sequence eventually becomes cyclic mod n for all n. - Isaac Saffold, Dec 01 2019

Examples

			For n = 4 there is 1 permutation of order 1, 9 permutations of order 2, 8 of order 3 and 6 of order 4, for a total of 67.
		

References

  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section XIII.2, p. 460.

Crossrefs

Programs

  • Maple
    b:= proc(n, g) option remember; `if`(n=0, g, add((j-1)!
          *b(n-j, ilcm(g, j))*binomial(n-1, j-1), j=1..n))
        end:
    a:= n-> b(n, 1):
    seq(a(n), n=0..30);  # Alois P. Heinz, Jul 11 2017
  • Mathematica
    CoefficientList[Series[Sum[n Fold[#1+MoebiusMu[n/#2] Apply[Times, Exp[x^#/#]&/@Divisors[#2] ]&,0,Divisors[n]],{n,Max[Apply[LCM,Partitions[19],1]]}],{x,0,19}],x] Range[0,19]! (* Wouter Meeussen, Jun 16 2012 *)
    a[ n_] := If[ n < 1, Boole[n == 0], 1 + Total @ Apply[LCM, Map[Length, First /@ PermutationCycles /@ Drop[Permutations @ Range @ n, 1], {2}], 1]]; (* Michael Somos, Aug 19 2018 *)
  • PARI
    \\ Naive method -- sum over cycles directly
    cycleDecomposition(v:vec)={
        my(cyc=List(), flag=#v+1, n);
        while((n=vecmin(v))<#v,
            my(cur=List(), i, tmp);
            while(v[i++]!=n,);
            while(v[i] != flag,
                listput(cur, tmp=v[i]);
                v[i]=flag;
                i=tmp
            );
            if(#cur>1, listput(cyc, Vec(cur)))    \\ Omit length-1 cycles
        );
        Vec(cyc)
    };
    permutationOrder(v:vec)={
        lcm(apply(length, cycleDecomposition(v)))
    };
    a(n)=sum(i=0,n!-1,permutationOrder(numtoperm(n,i)))
    \\ Charles R Greathouse IV, Nov 06 2014
    
  • PARI
    A060014(n) =
    {
      my(factn = n!, part, nb, i, j, res = 0);
      forpart(part = n,
        nb = 1; j = 1;
        for(i = 1, #part,
          if (i == #part || part[i + 1] != part[i],
            nb *= (i + 1 - j)! * part[i]^(i + 1 - j);
            j = i + 1));
        res += (factn / nb) * lcm(Vec(part)));
      res;
    } \\ Jerome Raulin, Jul 11 2017 (much faster, O(A000041(n)) vs O(n!))

Formula

E.g.f.: Sum_{n>0} (n*Sum_{i|n} (moebius(n/i)*Product_{j|i} exp(x^j/j))). - Vladeta Jovovic, Dec 29 2004; The sum over n should run to at least A000793(k) for producing the k-th entry. - Wouter Meeussen, Jun 16 2012
a(n) = Sum_{k>=1} k* A057731(n,k). - R. J. Mathar, Aug 31 2017

Extensions

More terms from Vladeta Jovovic, Mar 18 2001
More terms from Alois P. Heinz, Feb 14 2013

A057740 Irregular triangle read by rows: T(n,k) is the number of elements of alternating group A_n having order k, for n >= 1, 1 <= k <= A051593(n).

Original entry on oeis.org

1, 1, 1, 0, 2, 1, 3, 8, 1, 15, 20, 0, 24, 1, 45, 80, 90, 144, 1, 105, 350, 630, 504, 210, 720, 1, 315, 1232, 3780, 1344, 5040, 5760, 0, 0, 0, 0, 0, 0, 0, 2688, 1, 1323, 5768, 18900, 3024, 37800, 25920, 0, 40320, 9072, 0, 15120, 0, 0, 24192
Offset: 1

Views

Author

Roger Cuculière, Oct 29 2000

Keywords

Examples

			Triangle begins:
  1;
  1;
  1,    0,    2;
  1,    3,    8;
  1,   15,   20,     0,   24;
  1,   45,   80,    90,  144;
  1,  105,  350,   630,  504,   210,   720;
  1,  315, 1232,  3780, 1344,  5040,  5760, 0,     0,    0, 0,     0, 0, 0,  2688;
  1, 1323, 5768, 18900, 3024, 37800, 25920, 0, 40320, 9072, 0, 15120, 0, 0, 24192;
...
		

References

  • J. H. Conway, R. T. Curtis, S. P. Norton, R. A. Parker and R. A. Wilson, ATLAS of Finite Groups. Oxford Univ. Press, 1985 [for best online version see https://oeis.org/wiki/Welcome#Links_to_Other_Sites].

Crossrefs

Programs

  • Magma
    {* Order(g) : g in Alt(6) *};
  • Mathematica
    row[n_] := (orders = PermutationOrder /@ GroupElements[AlternatingGroup[n] ]; Table[Count[orders, k], {k, 1, Max[orders]}]); Table[row[n], {n, 1, 9}] // Flatten (* Jean-François Alcover, Aug 31 2016 *)

Extensions

More terms from N. J. A. Sloane, Nov 01 2000
Missing zero in the row for A_9 inserted by N. J. A. Sloane, Mar 27 2015

A074859 Number of elements of S_n having the maximum possible order g(n), where g(n) is Landau's function (A000793).

Original entry on oeis.org

1, 1, 1, 2, 6, 20, 240, 420, 2688, 18144, 120960, 2661120, 7983360, 103783680, 1037836800, 12454041600, 149448499200, 1693749657600, 60974987673600, 289631191449600, 5792623828992000, 121645100408832000, 3568256278659072000, 30776210403434496000, 738629049682427904000, 12310484161373798400000
Offset: 0

Views

Author

Christopher J. Smyth, Sep 11 2002

Keywords

References

  • J.-L. Nicolas, On Landau's function g(n), pp. 228-240 of R. L. Graham et al., eds., Mathematics of Paul Erdős I.

Crossrefs

Cf. A000793 (Landau's function g(n)).
Last row element of A057731. - Alois P. Heinz, Feb 14 2013

Programs

  • Mathematica
    g[n_] := Max[ Apply[ LCM, IntegerPartitions[n], 1]]; f[x_, n_] := Total[ (MoebiusMu[g[n]/#]*Exp[ Total[ (x^#/# & ) /@ Divisors[#]]] & ) /@ Divisors[g[n]]]; a[n_] := n!*Coefficient[ Series[f[x, n], {x, 0, n}], x^n]; Table[a[n], {n, 1, 25}] (* Jean-François Alcover, Nov 03 2011, after Vladeta Jovovic *)

Formula

a(n) = n!*coefficient of x^n in expansion of Sum_{i divides A000793(n)} mu(A000793(n)/i)*exp(Sum_{j divides i} x^j/j). - Vladeta Jovovic, Sep 29 2002

Extensions

Corrected and extended by Vladeta Jovovic, Sep 20 2002

A074351 Number of elements of S_n having order n.

Original entry on oeis.org

1, 1, 2, 6, 24, 240, 720, 5040, 40320, 514080, 3628800, 80166240, 479001600, 6797831040, 93774320640, 1307674368000, 20922789888000, 523845011289600, 6402373705728000, 153101632051630080, 2471368711740364800, 51182316789956352000, 1124000727777607680000
Offset: 1

Views

Author

K Murray Peebles (m.peebles(AT)sms.ed.ac.uk), Sep 26 2002

Keywords

Comments

If n is a prime power then a(n) = (n-1)!. - Vladeta Jovovic, Sep 29 2002

Examples

			a(10) = 514080 because {10}, {5, 2, 2, 1} and {5, 2, 1, 1, 1} are the unique multisets of cycle lengths summing to 10 whose lcm is 10 and 10!/(1!*10^1) + 10!/(1!*2!*1!*5^1*2^2*1^1) + 10!/(1!*1!*3!*5^1*2^1*1^3) = 514080.
		

Crossrefs

Cf. A001189, A074859, A290961 (the same for endofunctions).
Main diagonal of A057731.

Programs

  • Mathematica
    a[n_] := SeriesCoefficient[ Series[ Sum[ MoebiusMu[n/i]*Exp[Sum[x^j/j, {j, Divisors[i]}]], {i, Divisors[n]}], {x, 0, n}], n]*n!; Table[a[n], {n, 1, 21}] (* Jean-François Alcover, May 21 2012, after Vladeta Jovovic *)
  • PARI
    a(n)={n!*polcoeff(sumdiv(n, i, moebius(n/i)*exp(sumdiv(i, j, x^j/j) + O(x*x^n))), n)} \\ Andrew Howroyd, Jul 02 2018

Formula

n!/(a_1!*a_2!*...*a_d!*k_1^a_1*k_2^a_2*...*k_d^a_d) is the number of elements of S_n having order n that are permutations with distinct cycle-lengths k_1, ..., k_d having multiplicities a_1, ..., a_d, where lcm(k_1, ..., k_d)=n. Summing over all permutation types gives the total.
a(n) = n!*coefficient of x^n in expansion of Sum_{i divides n} mu(n/i)*exp(Sum_{j divides i} x^j/j). - Vladeta Jovovic, Sep 29 2002

A059593 Number of degree-n permutations of order exactly 5.

Original entry on oeis.org

0, 0, 0, 0, 0, 24, 144, 504, 1344, 3024, 78624, 809424, 4809024, 20787624, 72696624, 1961583624, 28478346624, 238536558624, 1425925698624, 6764765838624, 189239120970624, 3500701266525624, 37764092547420624, 288099608198025624
Offset: 0

Views

Author

Henry Bottomley, Jan 26 2001

Keywords

Comments

The number of degree-n permutations of order exactly p (where p is prime) satisfies a(n) =a(n-1) + (1+a(n-p))*(n-1)!/(n-p)! with a(n)=0 if p>n. Also a(n) = Sum_{j=1 to floor[n/p]} n!/(j!*(n-p*j)!*(p^j)).

Crossrefs

Column k=5 of A057731. - Alois P. Heinz, Feb 16 2013

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( Exp(x + x^5/5) )); [Factorial(n-1)*b[n]-1: n in [1..m]]; // G. C. Greubel, May 14 2019
    
  • Maple
    a:= proc(n) option remember;
          `if`(n<5, 0, a(n-1)+(1+a(n-5))*(n-1)!/(n-5)!)
        end:
    seq(a(n), n=1..30);  # Alois P. Heinz, Jan 25 2014
  • Mathematica
    Table[Sum[n!/(j!*(n-5*j)!*5^j), {j,1,Floor[n/5]}], {n,0,25}] (* G. C. Greubel, May 14 2019 *)
  • PARI
    {a(n) = sum(j=1,floor(n/5), n!/(j!*(n-5*j)!*5^j))}; \\ G. C. Greubel, May 14 2019
    
  • Sage
    m = 30; T = taylor(exp(x + x^5/5) -exp(x), x, 0, m); [factorial(n)*T.coefficient(x, n) for n in (0..m)] # G. C. Greubel, May 14 2019

Formula

a(n) = a(n - 1) + (1 + a(n - 5))*(n - 1)(n - 2)(n - 3)(n - 4).
a(n) = Sum_{j=1..floor(n/5)} n!/(j!*(n - 5*j)!*(5^j)).
From G. C. Greubel, May 14 2019: (Start)
a(n) = A052501(n) - 1.
E.g.f.: exp(x + x^5/5) - exp(x). (End)
Showing 1-10 of 22 results. Next