%I #13 Feb 11 2024 13:27:49
%S 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 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 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 Lesser of the smallest pair of consecutive positive reduced quadratic residues modulo p = prime(n) > 5.
%C 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 The constant 0.133141413191633911131141331131441391... = sum(a(n)/10^(n-3)) is conjectured to be irrational.
%H Nick Hobson, <a href="/A125607/b125607.txt">Table of n, a(n) for n = 4..1003</a>
%H 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 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 (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 Cf. A000445, A002307, A097159, A097160, A097161.
%K easy,nonn
%O 4,2
%A _Nick Hobson_, Nov 30 2006
|