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.

A123475 Product of the primitive roots of prime(n).

Original entry on oeis.org

1, 2, 6, 15, 672, 924, 11642400, 163800, 109681110000, 5590307923200, 970377408, 134088514560000, 138960660963091968000, 874927557504000, 3456156426256013065185600000000, 30688148115024695887527936000000
Offset: 1

Views

Author

T. D. Noe, Sep 27 2006

Keywords

Comments

Except for n=2, we have a(n)=1 (mod prime(n)).

Examples

			a(5)=672 because the primitive roots of 11 are {2,6,7,8}.
		

References

  • C. F. Gauss, Disquisitiones Arithmeticae, Yale, 1965; see p. 52.

Crossrefs

Cf. A060749 (primitive roots of prime(n)), A088144 (sum of primitive roots of prime(n)).

Programs

  • Mathematica
    PrimRoots[p_] := Select[Range[p-1], MultiplicativeOrder[ #,p]==p-1&]; Table[Times@@PrimRoots[Prime[n]], {n,20}]
    Times@@@Table[PrimitiveRootList[Prime[n]], {n, 20}] (* Harlan J. Brothers, Sep 02 2023 *)
  • PARI
    vecprod(v)=prod(i=1,#v,v[i])
    a(n,p=prime(n))=vecprod(select(n->znorder(Mod(n,p))==p-1,[2..p-1]))
    apply(p->a(0,p), primes(20)) \\ Charles R Greathouse IV, May 15 2015
    
  • Perl
    use ntheory ":all"; sub list { my $n=shift; grep { znorder($,$n) == $n-1 } 2..$n-1; } say vecprod(list($)) for @{primes(nth_prime(20))}; # Dana Jacobsen, May 15 2015