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!)
A274021 Least positive x < n-1 such that x^y == -1 (mod n) for some y > 1, or 0 if no such x exist. 1
0, 0, 0, 0, 2, 0, 3, 0, 2, 3, 2, 0, 2, 3, 0, 0, 2, 5, 2, 0, 5, 7, 5, 0, 2, 5, 2, 3, 2, 0, 3, 0, 2, 3, 19, 11, 2, 3, 17, 0, 2, 5, 2, 7, 14, 5, 5, 0, 3, 3, 0, 23, 2, 5, 19, 31, 2, 3, 2, 0, 2, 3, 5, 0, 2, 17, 2, 0, 5, 19, 7, 23, 3, 3, 14, 3, 6, 17, 3, 0, 2, 3, 2, 47, 13, 3, 5, 7, 3, 29, 10 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,5

COMMENTS

Indices of nonzero terms are listed in A126949 (in this sense the present sequence can be seen as characteristic function of A126949), indices of zeros (except for n=1) are given in A178751. Without the restriction x < n-1, one would have a(n) = n-1 instead of the zeros, since (n-1)^3 = (-1)^3 = -1 (mod n) for all n.

LINKS

Table of n, a(n) for n=1..91.

PROG

(PARI) A274021(n)={for(x=2, n-2, gcd(x, n)>1&&next; my(t=Mod(x, n)); while(abs(centerlift(t))>1, t*=x); t==-1&&return(x))}

CROSSREFS

Cf. A126949, A178751.

Sequence in context: A325799 A229946 A127460 * A303711 A154109 A011374

Adjacent sequences:  A274018 A274019 A274020 * A274022 A274023 A274024

KEYWORD

nonn

AUTHOR

M. F. Hasler, Jun 07 2016

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 August 5 16:17 EDT 2021. Contains 346480 sequences. (Running on oeis4.)