login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A128906 Difference between the greatest primitive root and the least primitive root of the n-th prime. 1
0, 0, 1, 2, 6, 9, 11, 13, 16, 25, 21, 33, 29, 31, 40, 49, 54, 57, 61, 62, 63, 74, 78, 83, 87, 97, 96, 102, 97, 107, 115, 126, 131, 133, 145, 140, 147, 157, 160, 169, 174, 177, 170, 183, 193, 194, 205, 211, 222, 217, 227, 230, 227, 242, 251, 256, 265, 263, 267, 275, 274 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..1001 (adapted to offset 1 by Sidney Cadot).
FORMULA
a(n) = A071894(n) - A001918(n).
MATHEMATICA
Table[(k=p-1; While[MultiplicativeOrder[k, p]!=p-1, k--]; k)-PrimitiveRoot@p, {p, Prime@Range@100}] (* Giorgos Kalogeropoulos, Sep 28 2023 *)
PROG
(PARI) a(n)=my(p=prime(n)); forstep(r=p-1, 2, -1, if(znorder(Mod(r, p))==p-1, return(r-lift(znprimroot(p)))));
vector(66, n, a(n)) \\ Joerg Arndt, Sep 29 2023
CROSSREFS
Sequence in context: A066586 A146974 A133160 * A192420 A139639 A187690
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Apr 21 2007
EXTENSIONS
a(1)=0 inserted by Georg Fischer, Dec 11 2022
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 15:34 EDT 2024. Contains 371794 sequences. (Running on oeis4.)