login
Least prime of maximal order mod n.
3

%I #12 May 17 2017 11:27:23

%S 2,3,2,3,2,5,3,3,2,3,2,5,2,3,2,3,3,5,2,3,2,7,5,5,2,7,2,3,2,7,3,3,2,3,

%T 2,5,2,3,2,3,7,5,3,3,2,5,5,5,3,3,5,7,2,5,2,3,2,3,2,7,2,3,2,3,2,5,2,3,

%U 2,3,7,5,5,5,2,3,2,7,3,3,2,7,2,5,3,3,2

%N Least prime of maximal order mod n.

%C a(prime(n)) = A122028(n).

%H Eric M. Schmidt, <a href="/A229708/b229708.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A111076(n) if and only if A111076(n) is prime. - _Jonathan Sondow_, May 17 2017

%o (Sage) def A229708(n) : m = Integers(n).unit_group_exponent(); return next(p for p in Primes() if n%p != 0 and mod(p,n).multiplicative_order() == m)

%Y Cf. A111076, A122028.

%K nonn,easy

%O 1,1

%A _Eric M. Schmidt_, Sep 27 2013