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!)
A261388 a(n) is the length of the longest stretch of consecutive primitive roots of the multiplicative group modulo prime(n). 2
1, 1, 2, 1, 3, 2, 3, 3, 3, 2, 3, 4, 3, 3, 4, 5, 5, 2, 3, 3, 3, 3, 7, 6, 5, 4, 5, 6, 4, 3, 4, 4, 5, 4, 6, 4, 4, 4, 6, 5, 6, 3, 5, 4, 5, 3, 4, 5, 7, 4, 7, 6, 4, 5, 6, 7, 9, 4, 4, 4, 9, 5, 4, 5, 4, 6, 4, 3, 8, 6, 7, 8, 5, 5, 4, 8, 5, 3, 5, 7, 8, 6, 6, 4, 4, 6, 9, 5, 4, 4, 11, 11, 5, 5, 5, 8, 7, 5, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Joerg Arndt, Table of n, a(n) for n = 1..9592 (terms for all primes < 10^5)

MATHEMATICA

a[n_] := 1 + Max[ Join[{0}, Length/@ Select[ Split@ Differences @ PrimitiveRootList @ Prime @ n, #[[1]] == 1 &]]]; Array[a, 99] (* Giovanni Resta, Aug 17 2015 *)

PROG

(PARI)

consec_pr(p)= \\ max number of consecutive primroots

{

    my( v = vector(p-1) );

    my (g = znprimroot(p) );

    for (j=1, p-1,  if (gcd(p-1, j)==1, v[lift(g^j)]=1 ) );

    my ( m=0, t=0 );

    for (j=1, p-1, if ( v[j]==0, t=0 , t+=1; if ( t>m, m=t ); ); );

    return(m);

}

forprime(p=2, 10^3, c=consec_pr(p);  print1( c, ", " ); );

CROSSREFS

Cf. A261438 (primes corresponding to records).

Sequence in context: A219609 A087825 A263100 * A253281 A029206 A029200

Adjacent sequences:  A261385 A261386 A261387 * A261389 A261390 A261391

KEYWORD

nonn

AUTHOR

Joerg Arndt, Aug 17 2015

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 June 21 00:15 EDT 2021. Contains 345323 sequences. (Running on oeis4.)