login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A111076 Smallest positive number of maximal order mod n. 9
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Charles R Greathouse IV, Table of n, a(n) for n = 1..10000

FORMULA

a(n) = A229708(n) if and only if a(n) is prime. - Jonathan Sondow, May 17 2017

EXAMPLE

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.

MATHEMATICA

Table[Min[

  Select[Range[n],

   CoprimeQ[#, n] &&

     MultiplicativeOrder[#, n] == CarmichaelLambda[n] &]], {n, 1, 100}]

(* Geoffrey Critzer, Jan 04 2015 *)

PROG

(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

CROSSREFS

Cf. A002322 (orders); same as A046145 for n with primitive roots; see also A001918 (for primes), A229708.

Sequence in context: A064886 A029600 A169616 * A162398 A131470 A255709

Adjacent sequences:  A111073 A111074 A111075 * A111077 A111078 A111079

KEYWORD

easy,nonn

AUTHOR

Franklin T. Adams-Watters, Oct 10 2005

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 18 02:57 EST 2020. Contains 332006 sequences. (Running on oeis4.)