OFFSET
2,1
COMMENTS
These are sometimes called quadratic non-residues modulo p(n). Denote a(n) by LQnR(p_n).
LINKS
Chris Caldwell: The Prime Pages Quadratic Residues.
PROG
(PARI) qnrp(fr, n)= {/* The largest QnR modulo the primes */ local(m, p, fl, jj, j, v=[]); fr=max(fr, 2); for(i=fr, n, m=0; p=prime(i); jj=0; fl=2^p-1; j=2; while((j<=(p-1)/2), jj=(j^2)%p; fl-=2^jj; j++); j=p-1; while(m==0, if(bitand(2^j, fl), m=j); j--); v=concat(v, m)); print(v)}
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Ferenc Adorjan (fadorjan(AT)freemail.hu), Sep 23 2003
STATUS
approved