This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A034794 #24 Sep 04 2016 22:52:10 %S A034794 2,7,19,31,41,43,53,59,67,73,79,89,97,101,107,127,139,151,163,173,179, %T A034794 193,197,223,241,251,283,293,307,313,317,353,383,389,409,419,443,457, %U A034794 461,467,487,499,521,523,571,577,593,601,607,619,631,641,643,653,659 %N A034794 a(n) is the least prime p > a(n-1) such that a(n-1) is a quadratic residue mod p. %C A034794 a(n-1) is a term in row a(n) of A046071. - _Reinhard Zumkeller_, May 10 2015 %H A034794 T. D. Noe, <a href="/A034794/b034794.txt">Table of n, a(n) for n=1..1000</a> %p A034794 f:= proc(t) local i,p; %p A034794 p:= t; %p A034794 do %p A034794 p:= nextprime(p); %p A034794 if numtheory:-jacobi(t,p) = 1 then return p fi %p A034794 od %p A034794 end proc: %p A034794 A[1]:= 2: %p A034794 for n from 2 to 100 do A[n]:= f(A[n-1]) od: %p A034794 seq(A[i],i=1..100); # _Robert Israel_, Sep 04 2016 %t A034794 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 *) %o A034794 (Haskell) %o A034794 a034794 n = a034794_list !! (n-1) %o A034794 a034794_list = 2 : f 2 (tail a000040_list) where %o A034794 f x (p:ps) = if elem x $ a046071_row p then p : f p ps else f x ps %o A034794 -- _Reinhard Zumkeller_, May 10 2015 %Y A034794 Cf. A092581. %Y A034794 Cf. A046071, A000040. %K A034794 nonn,nice %O A034794 1,1 %A A034794 _David W. Wilson_ %E A034794 Mathematica updated by _Jean-François Alcover_, Jul 04 2013 %E A034794 Name corrected by _Robert Israel_, Sep 04 2016