Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A088198
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A088198 Distance LQnR(p_n) (A088196) from p_n. +0
8
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.

Sequence in context: A116361 A106796 A082850 this_sequence A088426 A124769 A128227

Adjacent sequences: A088195 A088196 A088197 this_sequence A088199 A088200 A088201

KEYWORD

easy,nonn

AUTHOR

Ferenc Adorjan (fadorjan(AT)freemail.hu), Sep 23 2003

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 27 22:38 EST 2009. Contains 167602 sequences.


AT&T Labs Research