login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Distance between the sequence of primes and the largest "mixed" quadratic residues modulo the primes (A091380).
5

%I #2 Jun 01 2010 03:00:00

%S 1,2,2,3,2,2,3,2,5,2,3,2,3,2,5,2,2,2,2,7,5,3,2,3,5,2,3,2,2,3,3,2,3,2,

%T 2,3,2,2,5,2,2,2,7,5,2,3,2,3,2,2,3,7,7,2,3,5,2,3,2,3,2,2,2,11,5,2,2,5,

%U 2,2,3,7,3,2,2,5,2,2,3,7,2,2,7,5,3,2,3,5,2,3,2,13,3,2,2,5,2,3,2,2

%N Distance between the sequence of primes and the largest "mixed" quadratic residues modulo the primes (A091380).

%C Apart from the first term, it contains solely primes. Is every prime in there?

%C Apart from the first term and the definition, it is identical to the sequence A053760 by S. R. Finch.

%H Ferenc Adorjan, <a href="http://web.axelero.hu/fadorjan/qrp.pdf">The sequence of largest quadratic residues modulo the primes</a>

%o (PARI) {/* Distance of primes from the sequence of the largest "mixed" QR modulo the primes */ p_lqxr(to)=local(v=[1],k,r,q,p); for(i=2,to,p=prime(i);k=p-1;r=p%4-2; while(kronecker(k,p)<>r,k-=1); v=concat(v,p-k)); print(v) }

%Y Cf. A091380, A091381, A091383, A091384, A091385, A088192, A088198.

%K easy,nonn

%O 1,2

%A Ferenc Adorjan (fadorjan(AT)freemail.hu)