|
Search: id:A088198
|
|
| |
|
| 1, 2, 1, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 1, 1, 5, 1, 1, 3, 5, 2, 1, 1, 2, 3, 1, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 5, 2, 1, 1, 1, 1, 2, 3, 1, 7, 1, 3, 1, 2, 1, 2, 3, 1, 2, 1, 1, 5, 2, 1, 5, 1, 2, 3, 1, 1, 2, 1, 1, 2, 2, 3, 7, 1, 2, 1, 5, 1, 1, 3, 5, 2, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 2
(list; graph; listen)
|
|
|
OFFSET
|
2,2
|
|
|
COMMENT
|
The members of the sequence are either 1's or primes (easily provable)
|
|
LINKS
|
Ferenc Adorjan, The sequence of largest quadratic residues modulo the primes.
|
|
FORMULA
|
a(n)=p(n)-LQnR(p(n)), where p(n) is the n-th prime and LQnR(x) is the lagest quadratic non-residue modulo x.
|
|
PROGRAM
|
(PARI) qnrp_pm(fr, n)= {/* The the distance of primes from 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, p-m)); print(v)}
|
|
CROSSREFS
|
Cf. A088192, A088196, A088197, A088199, A088200, A088201.
Adjacent sequences: A088195 A088196 A088197 this_sequence A088199 A088200 A088201
Sequence in context: A116361 A106796 A082850 this_sequence A088426 A124769 A128227
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
Ferenc Adorjan (fadorjan(AT)freemail.hu), Sep 23 2003
|
|
|
Search completed in 0.002 seconds
|