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

A057731 Irregular triangle read by rows: T(n,k) = number of elements of order k in symmetric group S_n, for n >= 1, 1 <= k <= g(n), where g(n) = A000793(n) is Landau's function.

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 1, 9, 8, 6, 1, 25, 20, 30, 24, 20, 1, 75, 80, 180, 144, 240, 1, 231, 350, 840, 504, 1470, 720, 0, 0, 504, 0, 420, 1, 763, 1232, 5460, 1344, 10640, 5760, 5040, 0, 4032, 0, 3360, 0, 0, 2688, 1, 2619, 5768, 30996, 3024, 83160, 25920, 45360, 40320, 27216, 0, 30240, 0, 25920, 24192, 0, 0, 0, 0, 18144
Offset: 1

Views

Author

Roger Cuculière, Oct 29 2000

Keywords

Comments

Every row for n >= 7 contains zeros. Landau's function quickly becomes > 2*n, and there is always a prime between n and 2*n. T(n,p) = 0 for such a prime p. - Franklin T. Adams-Watters, Oct 25 2011

Examples

			Triangle begins:
  1;
  1,   1;
  1,   3,   2;
  1,   9,   8,   6;
  1,  25,  20,  30,  24,   20;
  1,  75,  80, 180, 144,  240;
  1, 231, 350, 840, 504, 1470, 720, 0, 0, 504, 0, 420;
  ...
		

References

  • Herbert S. Wilf, "The asymptotics of e^P(z) and the number of elements of each order in S_n." Bull. Amer. Math. Soc., 15.2 (1986), 225-232.

Crossrefs

Cf. A000793, also A054522 (for cyclic group), A057740 (alternating group), A057741 (dihedral group).
Rows sums give A000142, last elements of rows give A074859, columns k=2, 3, 5, 7, 11 give A001189, A001471, A059593, A153760, A153761. - Alois P. Heinz, Feb 16 2013
Main diagonal gives A074351.
Cf. A222029.

Programs

  • Magma
    {* Order(g) : g in Sym(6) *};
    
  • Maple
    with(group):
    for n from 1 do
        f := [seq(0,i=1..n!)] ;
        mknown := 0 ;
        # loop through the permutations of n
        Sn := combinat[permute](n) ;
        for per in Sn do
            # write this permutation in cycle notation
            gen := convert(per,disjcyc) ;
            # compute the list of lengths of the cycles, then the lcm of these
            cty := [seq(nops(op(i,gen)),i=1..nops(gen))] ;
            if cty <> [] then
                lcty := lcm(op(cty)) ;
            else
                lcty := 1 ;
            end if;
            f := subsop(lcty = op(lcty,f)+1,f) ;
            mknown := max(mknown,lcty) ;
        end do:
        ff := add(el,el=f) ;
        print(seq(f[i],i=1..mknown)) ;
    end do: # R. J. Mathar, May 26 2014
    # second Maple program:
    b:= proc(n, g) option remember; `if`(n=0, x^g, add((j-1)!
          *b(n-j, ilcm(g, j))*binomial(n-1, j-1), j=1..n))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(b(n, 1)):
    seq(T(n), n=1..12);  # Alois P. Heinz, Jul 11 2017
  • Mathematica
    <Jean-François Alcover, Aug 31 2016 *)
    b[n_, g_] := b[n, g] = If[n == 0, x^g, Sum[(j-1)!*b[n-j, LCM[g, j]]* Binomial[n-1, j-1], {j, 1, n}]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 1, Exponent[p, x]}]][ b[n, 1]];
    Array[T, 12] // Flatten (* Jean-François Alcover, May 03 2019, after Alois P. Heinz *)
  • PARI
    T(n,k)={n!*polcoeff(sumdiv(k, i, moebius(k/i)*exp(sumdiv(i, j, x^j/j) + O(x*x^n))), n)} \\ Andrew Howroyd, Jul 02 2018

Formula

Sum_{k=1..A000793(n)} k*T(n,k) = A060014(n); A000793 = Landau's function.

Extensions

More terms from N. J. A. Sloane, Nov 01 2000

A028418 Sum over all n! permutations of n letters of maximum cycle length.

Original entry on oeis.org

1, 3, 13, 67, 411, 2911, 23563, 213543, 2149927, 23759791, 286370151, 3734929903, 52455166063, 788704078527, 12648867695311, 215433088624351, 3884791172487903, 73919882720901823, 1480542628345939807, 31128584449987511871, 685635398619169059391
Offset: 1

Views

Author

Joe Keane (jgk(AT)jgk.org)

Keywords

Comments

Sum the n-permutations having at least 1 cycle of length >= i for all i >= 1. A000142 + A033312 + A066052 + A202364 + ... The summation is precisely that indicated in the title since each permutation whose longest cycle = i is counted i times. - Geoffrey Critzer, Jan 09 2013

References

  • S. W. Golomb, Shift-Register Sequences, Holden-Day, San Francisco, 1967, p. 183.
  • R. Sedgewick and P. Flajolet, Analysis of Algorithms, Addison Wesley, 1996, page 358.

Crossrefs

Column k=1 of A322384.

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0, m, add((j-1)!*
          b(n-j, max(m,j))*binomial(n-1, j-1), j=1..n))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=1..25);  # Alois P. Heinz, May 14 2016
  • Mathematica
    kmax = 19; gf[x_] = Sum[ 1/(1-x) - 1/(E^((x^(1+k)*Hypergeometric2F1[1+k, 1, 2+k, x])/ (1+k))*(1-x)), {k, 0, kmax}];
    a[n_] := n!*Coefficient[Series[gf[x], {x, 0, kmax}], x^n]; Array[a, kmax]
    (* Jean-François Alcover, Jun 22 2011, after e.g.f. *)
    a[ n_] := If[ n < 1, 0, 1 + Total @ Apply[ Max, Map[ Length, First /@ PermutationCycles /@ Drop[ Permutations @ Range @ n, 1], {2}], 1]]; (* Michael Somos, Aug 19 2018 *)

Formula

E.g.f.: Sum_{k>=0} (1/(1-x) - exp(Sum_{j=1..k} x^j/j)).
a(n) = f(n, 0, n, n!) where f(L, r, n, m) = m*r if r >= l, otherwise Sum_{k=0..L-1} (f(k, max(L-k,r), n-1, m/n) + (n-L)*f(L, r, n-1, m/n)). - Thomas Dybdahl Ahle, Aug 15 2011
a(n) = Sum_{k=1..n} k * A126074(n,k). - Alois P. Heinz, May 17 2016

Extensions

More terms from Vladeta Jovovic, Sep 19 2002
More terms from Thomas Dybdahl Ahle, Aug 15 2011

A060015 Sum of orders of all even permutations of n letters.

Original entry on oeis.org

1, 1, 7, 31, 211, 1411, 12601, 137047, 1516831, 18111751, 223179001, 2973194071, 46287964867, 835826439631, 15722804528341, 292673102609791, 5177400032329231, 102538737981192607, 2284570602107946601
Offset: 1

Views

Author

N. J. A. Sloane, Mar 17 2001

Keywords

Examples

			For n = 4 there is 1 even permutation (1) of order 1, 3 even permutations (12)(34) etc. of order 2 and 8 (123) etc. of order 3, for a total of 31.
		

Crossrefs

Cf. A060014.

Programs

  • Mathematica
    g[list_]:=Total[list]!/Apply[Times,list]/Apply[Times,Table[Count[list,n]!,{n,1,20}]];f[list_]:=Apply[Plus,Table[Count[list,n],{n,2,20,2}]];Map[Total,Table[Map[g,Select[Partitions[n],EvenQ[f[#]]&]]*Map[Apply[LCM,#]&,Select[Partitions[n],EvenQ[f[#]]&]],{n,1,20}]]  (* Geoffrey Critzer, Mar 26 2013 *)

Extensions

More terms from Vladeta Jovovic, Mar 18 2001

A290932 Sum of the LCM of cycle lengths over all endofunctions on [n].

Original entry on oeis.org

1, 1, 5, 40, 431, 5886, 96817, 1862890, 41043375, 1018584610, 28108489541, 853617865134, 28287119604955, 1015630741097350, 39273014068691145, 1627118268024495586, 71904849762914854703, 3375959341815207350850, 167810405947367539063885, 8803814897608815310714270
Offset: 0

Views

Author

Alois P. Heinz, Aug 13 2017

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0, m, add((j-1)!*
          b(n-j, ilcm(m, j))*binomial(n-1, j-1), j=1..n))
        end:
    a:= n-> add(b(j, 1)*n^(n-j)*binomial(n-1, j-1), j=0..n):
    seq(a(n), n=0..25);
  • Mathematica
    T[n_, k_] := T[n, k] = If[n == 0, k, Sum[(j - 1)! * T[n - j, LCM[k, j]]*Binomial[n - 1, j - 1], {j, n}]]; {1}~Join~Table[Sum[T[j, 1]*n^(n - j)*Binomial[n - 1, j - 1], {j, 0, n}], {n, 19}] (* Michael De Vlieger, Aug 17 2017 *)

Formula

a(n) = Sum_{k=1..A000793(n)} k * A222029(n,k).

A060179 Sum of distinct orders of degree-n permutations.

Original entry on oeis.org

1, 1, 3, 6, 10, 21, 21, 50, 73, 116, 167, 248, 385, 496, 728, 959, 1548, 1899, 2835, 3609, 5042, 6403, 8336, 12187, 15522, 21358, 26090, 35298, 44147, 62512, 76289, 101403, 123883, 156880, 200086, 254175, 335380, 413184, 505860, 615258, 810767, 980747, 1293953
Offset: 0

Views

Author

Vladeta Jovovic, Mar 19 2001

Keywords

Examples

			Set of orders of all degree 7 permutations is {1,2,3,4,5,6,7,10,12} so a(7)=1+2+3+4+5+6+7+10+12=50.
		

Crossrefs

Cf. A009490.
Row sums of A256553.

Programs

  • Maple
    b:= proc(n, i) option remember; (p->`if`(i*n=0, 1,
           add(b(n-p^j, i-1)*p^j, j=1..ilog[p](n))+
             b(n, i-1)))(`if`(i=0, 0, ithprime(i)))
        end:
    a:= n-> b(n, numtheory[pi](n)):
    seq(a(n), n=0..50);  # Alois P. Heinz, Jul 12 2017
  • Mathematica
    b[n_, i_] := b[n, i] = Function [p, If[i*n == 0, 1, Sum[b[n-p^j, i-1]*p^j, {j, 1, Floor@Log[p, n]}] + b[n, i-1]]][If[i == 0, 0, Prime[i]]];
    a[n_] := b[n, PrimePi[n]];
    a /@ Range[0, 50] (* Jean-François Alcover, Mar 14 2021, after Alois P. Heinz *)

Formula

G.f.: Prod(p prime, 1 + Sum(k >= 1, p^k*x^(p^k))) / (1-x). - Vladeta Jovovic, Sep 18 2002

Extensions

More terms from David Wasserman, May 29 2002
a(0)=1 prepended by Alois P. Heinz, Apr 01 2015

A346066 Sum of GCD of cycle lengths over all permutations of [n].

Original entry on oeis.org

0, 1, 3, 10, 45, 216, 1505, 9360, 84105, 730240, 7715169, 76204800, 1090114025, 11975040000, 185501455425, 2791872219136, 45361870178625, 690452066304000, 14415096609538625, 236887827111936000, 5448878874163974249, 108418310412206080000, 2381309423564793710625
Offset: 0

Views

Author

Alois P. Heinz, Jul 03 2021

Keywords

Examples

			a(3) = 10 = 3+3+1+1+1+1: (123), (132), (1)(23), (13)(2), (12)(3), (1)(2)(3).
		

Crossrefs

Cf. A060014 (the same for LCM), A346085.

Programs

  • Maple
    b:= proc(n, g) option remember; `if`(n=0, g, add((j-1)!
          *b(n-j, igcd(g, j))*binomial(n-1, j-1), j=1..n))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..24);
  • Mathematica
    b[n_, g_] := b[n, g] = If[n == 0, g, Sum[(j - 1)!*
         b[n - j, GCD[g, j]]*Binomial[n - 1, j - 1], {j, 1, n}]];
    a[n_] := b[n, 0];
    Table[a[n], {n, 0, 24}] (* Jean-François Alcover, Mar 06 2022, after Alois P. Heinz *)

Formula

a(n) = Sum_{k=1..n} k * A346085(n,k).

A143300 Decimal expansion of the Goh-Schmutz constant.

Original entry on oeis.org

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

Views

Author

Eric W. Weisstein, Aug 05 2008

Keywords

Comments

This constant is the limit of the logarithm expected order of a random permutation of length n, divided by sqrt(n/log n). In other words, log(A060014(n)/n!) ~ c sqrt(n/log n) where c is this constant. Stong improves the error term to O(sqrt(n) log log n/log n). - Charles R Greathouse IV, Nov 06 2014

Examples

			1.1178641511899449731...
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003. See p. 287.

Programs

Formula

From Amiram Eldar, Aug 13 2020: (Start)
Equals Integral_{x=0..oo} log(x+1)/(exp(x) - 1) dx.
Equals Integral_{x=0..oo} log(1 - log(1 - exp(-x))) dx.
Equals Integral_{x=0..oo} x*exp(-x)/((1 - exp(-x)) * (1 - log(1 - exp(-x)))) dx.
Equals -Sum_{k>=1} exp(k) * Ei(-k)/k, where Ei is the exponential integral. (End)

A382780 Sum of the orders of all permutations of [n] with distinct cycle lengths.

Original entry on oeis.org

1, 1, 2, 12, 48, 360, 2520, 22680, 221760, 2298240, 28425600, 385862400, 5269017600, 80951270400, 1347631084800, 21565729785600, 413922526617600, 8409043612569600, 172028224598630400, 3765253760710041600, 84080417596471296000, 1935910813364656128000
Offset: 0

Views

Author

Alois P. Heinz, May 11 2025

Keywords

Examples

			a(3) = 12 = 2+2+2+3+3: (1)(23), (13)(2), (12)(3), (123), (132).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, m) option remember; `if`(i*(i+1)/2 b(n$2, 1):
    seq(a(n), n=0..22);

A060178 Sum of orders of all odd permutations of n letters.

Original entry on oeis.org

0, 2, 6, 36, 260, 1860, 18732, 162176, 1774656, 20909160, 320781560, 4493532912, 72263548656, 1081552065776, 16682494491600, 315573151180800, 7042434106860032, 151228601744085216, 3306518316205792416
Offset: 1

Views

Author

Vladeta Jovovic, Mar 18 2001

Keywords

Crossrefs

A067835 Average order of an element in the symmetric group S_n rounded down.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 6, 7, 9, 10, 13, 15, 19, 21, 24, 29, 34, 39, 45, 51, 57, 66, 76, 86, 96, 108, 120, 134, 150, 170, 189, 208, 228, 253, 278, 310, 342, 375, 409, 449, 494, 544, 595, 645, 699, 761, 834, 909, 986, 1069, 1153, 1247, 1356, 1473, 1589, 1710, 1841
Offset: 0

Views

Author

Sharon Sela (sharonsela(AT)hotmail.com), Feb 09 2002

Keywords

Crossrefs

Cf. A060014.

Formula

a(n) = floor(A060014(n) / n!).

Extensions

More terms from Alois P. Heinz, Apr 01 2015
Showing 1-10 of 13 results. Next