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-5 of 5 results.

A096596 a(n) = A060178(n) - A060015(n).

Original entry on oeis.org

-1, 1, -1, 5, 49, 449, 6131, 25129, 257825, 2797409, 97602559, 1520338841, 25975583789, 245725626145, 959689963259, 22900048571009, 1865034074530801, 48689863762892609, 1021947714097845815
Offset: 1

Views

Author

Russell Walsmith (russw(AT)lycos.com), Aug 10 2004

Keywords

Crossrefs

Extensions

More terms from Vladeta Jovovic, Aug 10 2004
Shorter name from Joerg Arndt, Sep 21 2020

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

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

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

A060180 Sum of distinct orders of degree-n even permutations.

Original entry on oeis.org

1, 1, 4, 6, 11, 15, 28, 43, 74, 103, 148, 213, 296, 476, 679, 990, 1133, 1707, 2225, 3260, 4591, 6042, 7343, 9374, 13774, 18262, 25244, 30379, 39768, 47295, 66471, 87903, 115570, 139802, 173605, 215878, 271434, 369256, 466904, 569623, 664775
Offset: 1

Views

Author

Vladeta Jovovic, Mar 19 2001

Keywords

Examples

			Set of orders of all degree 5 even permutations is {1,2,3,5} so a(5)=1+2+3+5=11.
		

Crossrefs

Extensions

More terms from David Wasserman, May 29 2002
Showing 1-5 of 5 results.