cp's OEIS Frontend

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.

A125607 Lesser of the smallest pair of consecutive positive reduced quadratic residues modulo p = prime(n) > 5.

This page as a plain text file.
%I A125607 #13 Feb 11 2024 13:27:49
%S A125607 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,
%T A125607 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,
%U A125607 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
%N A125607 Lesser of the smallest pair of consecutive positive reduced quadratic residues modulo p = prime(n) > 5.
%C A125607 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.
%C A125607 The constant 0.133141413191633911131141331131441391... = sum(a(n)/10^(n-3)) is conjectured to be irrational.
%H A125607 Nick Hobson, <a href="/A125607/b125607.txt">Table of n, a(n) for n = 4..1003</a>
%H A125607 D. H. Lehmer and Emma Lehmer, <a href="http://dx.doi.org/10.1090/S0002-9939-1962-0138582-6">On Runs of Residues</a>, Proc. American Mathematical Society, Vol. 13, No. 1 (Feb., 1962), pp. 102-106.
%e A125607 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.
%o A125607 (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)))))
%Y A125607 Cf. A000445, A002307, A097159, A097160, A097161.
%K A125607 easy,nonn
%O A125607 4,2
%A A125607 _Nick Hobson_, Nov 30 2006