The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A034794 a(n) is the least prime p > a(n-1) such that a(n-1) is a quadratic residue mod p. 5
 2, 7, 19, 31, 41, 43, 53, 59, 67, 73, 79, 89, 97, 101, 107, 127, 139, 151, 163, 173, 179, 193, 197, 223, 241, 251, 283, 293, 307, 313, 317, 353, 383, 389, 409, 419, 443, 457, 461, 467, 487, 499, 521, 523, 571, 577, 593, 601, 607, 619, 631, 641, 643, 653, 659 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS a(n-1) is a term in row a(n) of A046071. - Reinhard Zumkeller, May 10 2015 LINKS T. D. Noe, Table of n, a(n) for n=1..1000 MAPLE f:= proc(t) local i, p; p:= t; do p:= nextprime(p); if numtheory:-jacobi(t, p) = 1 then return p fi od end proc: A[1]:= 2: for n from 2 to 100 do A[n]:= f(A[n-1]) od: seq(A[i], i=1..100); # Robert Israel, Sep 04 2016 MATHEMATICA f[n_] := Block[{k = PrimePi[n] + 1}, While[ JacobiSymbol[n, Prime[k]] == -1, k++ ]; Prime[k]]; NestList[f, 2, 54] (* Robert G. Wilson v, Mar 16 2004 *) PROG (Haskell) a034794 n = a034794_list !! (n-1) a034794_list = 2 : f 2 (tail a000040_list) where f x (p:ps) = if elem x \$ a046071_row p then p : f p ps else f x ps -- Reinhard Zumkeller, May 10 2015 CROSSREFS Cf. A092581. Cf. A046071, A000040. Sequence in context: A144589 A179002 A232667 * A213892 A152608 A334520 Adjacent sequences: A034791 A034792 A034793 * A034795 A034796 A034797 KEYWORD nonn,nice AUTHOR David W. Wilson EXTENSIONS Mathematica updated by Jean-François Alcover, Jul 04 2013 Name corrected by Robert Israel, Sep 04 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified October 1 14:54 EDT 2023. Contains 365826 sequences. (Running on oeis4.)