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!)
A307965 a(n) is the least prime p = prime(k) > prime(n) such that A306530(k) = prime(n). 2
7, 11, 19, 53, 43, 173, 67, 2477, 8803, 9173, 32323, 37123, 163, 74093, 170957, 360293, 679733, 2404147, 2004917, 69009533, 51599563, 155757067, 96295483, 146161723, 1408126003, 3519879677, 2050312613, 3341091163, 78864114883, 65315700413, 1728061733, 9447241877 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
This sequence is analogous to A000229, but for least prime quadratic residue modulo p.
Note that a(n) is the least odd number m > prime(n) such that prime(n)^((m-1)/2) == 1 (mod m) and q^((m-1)/2) == -1 (mod m) for every prime q < prime(n). Such m is always an odd prime.
LINKS
MATHEMATICA
f[n_] := Module[{p = Prime[n], q = 2}, While[JacobiSymbol[q, p] != 1, q = NextPrime[q]]; q]; a[n_] := Module[{p = Prime[n], k = n + 1}, While[f[k] != p, k++]; Prime[k]]; Array[a, 20]
PROG
(PARI) f(n) = my(i=1, p = prime(n)); while(kronecker(prime(i), p)! = 1, i++); prime(i); \\ A306530
a(n) = my(p=prime(n), iq = p+1, q=nextprime(iq)); while(f(iq)!= p, iq++); prime(iq); \\ Michel Marcus, May 12 2019
CROSSREFS
Sequence in context: A154555 A285016 A162857 * A323109 A023267 A319224
KEYWORD
nonn
AUTHOR
Amiram Eldar and Thomas Ordowski, May 08 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 April 19 15:34 EDT 2024. Contains 371794 sequences. (Running on oeis4.)