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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A125607 Lesser of the smallest pair of consecutive positive reduced quadratic residues modulo p = prime(n) > 5. 1
1, 3, 3, 1, 4, 1, 4, 1, 3, 1, 9, 1, 6, 3, 3, 9, 1, 1, 1, 3, 1, 1, 4, 1, 3, 3, 1, 1, 3, 1, 4, 4, 1, 3, 9, 1, 9, 3, 3, 1, 1, 6, 1, 4, 1, 3, 3, 1, 1, 1, 3, 1, 1, 4, 1, 3, 1, 6, 9, 6, 1, 1, 6, 4, 1, 3, 3, 1, 1, 1, 3, 4, 1, 4, 3, 1, 1, 3, 3, 1, 1, 1, 3, 1, 1, 4, 1, 3, 1, 1, 3, 4, 1, 4, 1, 6, 3, 9, 6, 3, 1, 4, 1, 3, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
4,2
COMMENTS
For all n, a(n) exists and equals 1, 3, 4, 6 or 9. Proof: a(4)=1 by inspection. For n > 4 (p > 7), if 2 is a quadratic residue of p, then a(n)=1; otherwise if 5 is a quadratic residue of p, then a(n)=4 or 3; otherwise 2*5=10 is a quadratic residue of p and (9, 10) are consecutive residues. However, a(n)=8 or 7 is impossible as 8 cannot be a quadratic residue (since 2 is not), leaving 9 and 6 as the other possible values.
The constant 0.133141413191633911131141331131441391... = sum(a(n)/10^(n-3)) is conjectured to be irrational.
LINKS
D. H. Lehmer and Emma Lehmer, On Runs of Residues, Proc. American Mathematical Society, Vol. 13, No. 1 (Feb., 1962), pp. 102-106.
EXAMPLE
The quadratic residues of 13=prime(6) are 1, 3, 4, 9, 10 and 12. The least consecutive pair of residues is (3, 4); hence a(6)=3.
PROG
(PARI) vector(108, m, p=prime(m+3); if(p%8==1||p%8==7, 1, if(p%12==1||p%12==11, 3, if(p%10==1||p%10==9, 4, if((p%24==1||p%24==5||p%24==19||p%24==23) && (p%28==1||p%28==3||p%28==9||p%28==19||p%28==25||p%28==27), 6, 9)))))
CROSSREFS
Sequence in context: A306148 A106836 A241235 * A137876 A016604 A255058
KEYWORD
easy,nonn
AUTHOR
Nick Hobson, Nov 30 2006
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 3 15:31 EDT 2024. Contains 373982 sequences. (Running on oeis4.)