The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A330404 Least nonsquare k that is a quadratic residue modulo n. 3
2, 2, 3, 5, 5, 3, 2, 8, 7, 5, 3, 12, 3, 2, 6, 17, 2, 7, 5, 5, 7, 3, 2, 12, 6, 3, 7, 8, 5, 6, 2, 17, 3, 2, 11, 13, 3, 5, 3, 20, 2, 7, 6, 5, 10, 2, 2, 33, 2, 6, 13, 12, 6, 7, 5, 8, 6, 5, 3, 21, 3, 2, 7, 17, 10, 3, 6, 8, 3, 11, 2, 28, 2, 3, 6, 5, 11, 3, 2, 20, 7, 2, 3, 21 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(n) >= n if and only if n is in A254328.
It seems that lim_{n->oo} a(n)/n = 0. Conjectured last term m such that a(m)/m >= 1/k, k = 1, 2, 3, ...: 16, 48, 240, 288, 720, 720, 720, 720, 1008, 1440, ...
LINKS
EXAMPLE
k is a quadratic residue modulo 16 if and only if k == 0, 1, 4, 9 (mod 16). Since 0, 1, 4, 9 and 16 are squares, a(16) = 17.
k is a quadratic residue modulo 48 if and only if k == 0, 1, 4, 9, 16, 25, 33, 36 (mod 48). Since 0, 1, 4, 9, 16 and 25 are squares, a(48) = 33.
k is a quadratic residue modulo 720 if and only if k == 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 145, ..., 676 (mod 720). Since 0, 1, 4, ..., 144 are squares, a(720) = 145.
PROG
(PARI) a(n) = my(k=1); while(!issquare(Mod(k, n)) || issquare(k), k++); k
CROSSREFS
A309680 is an alternate version.
Sequence in context: A360461 A284114 A323480 * A340575 A139171 A329570
KEYWORD
nonn
AUTHOR
Jianing Song, Dec 14 2019
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 May 15 12:24 EDT 2024. Contains 372540 sequences. (Running on oeis4.)