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!)
A374155 a(n) is the least prime that is a quadratic residue modulo prime(n). First column of A373751. 1
2, 3, 5, 2, 3, 3, 2, 5, 2, 5, 2, 3, 2, 11, 2, 7, 3, 3, 17, 2, 2, 2, 3, 2, 2, 5, 2, 3, 3, 2, 2, 3, 2, 5, 5, 2, 3, 41, 2, 13, 3, 3, 2, 2, 7, 2, 5, 2, 3, 3, 2, 2, 2, 3, 2, 2, 5, 2, 3, 2, 7, 17, 7, 2, 2, 7, 5, 2, 3, 3, 2, 2, 2, 3, 5, 2, 5, 3, 2, 2, 3, 3, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(38) = 41 because row 38 of A373751 starts 41, 43, 47, ..., which are the primes that are quadratic residues modulo 163.
MAPLE
a := proc(n) local a, p; a := 1; p := ithprime(n); while true do a := a + 1;
if NumberTheory:-QuadraticResidue(a, p) = 1 and isprime(a) then return a fi od end: seq(a(n), n = 1..85);
PROG
(PARI) a(n) = my(p=prime(n), q=2); while (!issquare(Mod(q, p)), q=nextprime(q+1)); q; \\ Michel Marcus, Jun 29 2024
CROSSREFS
Variant: A306530 (differs in the first 3 values).
Cf. A373751.
Sequence in context: A133907 A232931 A060084 * A361503 A265668 A273087
KEYWORD
nonn
AUTHOR
Peter Luschny, Jun 29 2024
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 September 5 07:27 EDT 2024. Contains 375686 sequences. (Running on oeis4.)