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.

A111076 Smallest positive number of maximal order mod n.

This page as a plain text file.
%I A111076 #29 Jan 18 2019 08:59:50
%S A111076 1,1,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 A111076 2,5,2,3,2,3,6,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 A111076 2,3,7,5,5,5,2,3,2,7,3,3,2,7,2,5,3,3,2,3,3,7,2,3,11,5,2,5,5,3,2,3
%N A111076 Smallest positive number of maximal order mod n.
%H A111076 Charles R Greathouse IV, <a href="/A111076/b111076.txt">Table of n, a(n) for n = 1..10000</a>
%F A111076 a(n) = A229708(n) if and only if a(n) is prime. - _Jonathan Sondow_, May 17 2017
%e A111076 a(6)=5 because order of 1 is 1 and 2 through 4 are not relatively prime to 6, but 5 has order 2, which is the maximum possible.
%t A111076 Table[Min[
%t A111076   Select[Range[n],
%t A111076    CoprimeQ[#, n] &&
%t A111076      MultiplicativeOrder[#, n] == CarmichaelLambda[n] &]], {n, 1, 100}]
%t A111076 (* _Geoffrey Critzer_, Jan 04 2015 *)
%o A111076 (PARI) a(n)=if(n==1, return(1)); if(n<5,return(n-1)); my(o=lcm(znstar(n)[2]),k=1); while(gcd(k++,n)>1 || znorder(Mod(k,n))<o, ); k \\ _Charles R Greathouse IV_, Jul 31 2013
%Y A111076 Cf. A002322 (orders); same as A046145 for n with primitive roots; see also A001918 (for primes), A229708.
%K A111076 easy,nonn
%O A111076 1,3
%A A111076 _Franklin T. Adams-Watters_, Oct 10 2005