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.

A384630 Number of self-inverse double cosets in Z_n\S_n/Z_n.

Original entry on oeis.org

1, 1, 2, 3, 6, 14, 34, 98, 294, 952, 3246, 11698, 43732, 170752, 689996, 2888034, 12458784, 55406422, 253142182, 1187934740, 5712033368, 28131119956, 141645386202, 728841303696, 3827217750492, 20499431084644, 111876916526070, 621831335167486, 3516904353610572
Offset: 1

Views

Author

Ludovic Schwob, Jun 05 2025

Keywords

Comments

Z_n is the cyclic group of order n, seen as a subgroup of the symmetric group S_n.
Cosets in S_n/Z_n are in bijection with cycles obtained by connecting cyclically n equally spaced points on a circle. Double cosets in Z_n\S_n/Z_n are in bijection with cycles up to rotation.

Crossrefs

Cf. A000142 (cycles), A002619 (cycles up to rotation), A384631 (self-inverse polygons).

Programs

  • Python
    # From Proposition 4.1 in the reference:
    from sympy import factorial,divisors,totient
    def A384630(n):
        s = 0
        if n%2==0:
            for d in divisors(n//2):
                if d%2==0:
                    s += totient(d)*(d//2)**(n//2//d)*factorial(n//d)//factorial(n//2//d)
                else:
                    s += totient(d)*sum(factorial(n//d)*d**i//2**i//factorial(i)//factorial(n//d-2*i) for i in range(n//2//d+1))
        else:
            for d in divisors(n):
                s += totient(d)*sum(factorial(n//d)*d**i//2**i//factorial(i)//factorial(n//d-2*i) for i in range(n//d//2+1))
        return s//n