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

A382221 Products of primitive roots when n is 2, 4, p^k, or 2p^k (with p an odd prime), for all other n the value is defined to be 1.

Original entry on oeis.org

1, 1, 2, 3, 6, 5, 15, 1, 10, 21, 672, 1, 924, 15, 1, 1, 11642400, 55, 163800, 1, 1, 29393, 109681110000, 1, 64411776, 21945, 708400, 1, 5590307923200, 1, 970377408, 1, 1, 644812245, 1, 1, 134088514560000, 11756745, 1, 1, 138960660963091968000, 1
Offset: 1

Views

Author

DarĂ­o Clavijo, Mar 27 2025

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Times @@ PrimitiveRootList[n], {n, 42}] (* Michael De Vlieger, Apr 07 2025 *)
  • Python
    from sympy import gcd, primitive_root, totient
    def a(n):
        try:
            g = primitive_root(n)
        except ValueError:
            return 1
        P = 1
        if g:
            phi = totient(n)
            for k in range(1, phi):
                if gcd(k, phi) == 1:
                    P *= pow(g, k, n)
        return P
    print([a(n) for n in range(1,43)])

Formula

a(n) = A123475(n) if n is prime.
a(A180634(n)) = 1.
a(n) > 1 if n in A033948.
Showing 1-1 of 1 results.