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.

A096636 Smallest prime p > prime(n+2) such that p is a quadratic residue mod the first n odd primes 3, 5, 7, 11, ..., prime(n+1), and p is a quadratic non-residue mod prime(n+2).

This page as a plain text file.
%I A096636 #36 Mar 07 2013 20:33:16
%S A096636 5,7,19,79,331,751,1171,7459,10651,18379,90931,78439,399499,644869,
%T A096636 2631511,1427911,4355311,5715319,49196359,43030381,163384621,
%U A096636 249623581,452980999,1272463669,505313251
%N A096636 Smallest prime p > prime(n+2) such that p is a quadratic residue mod the first n odd primes 3, 5, 7, 11, ..., prime(n+1), and p is a quadratic non-residue mod prime(n+2).
%C A096636 Same as smallest prime p with property that the Legendre symbol (p|q) = 1 for the first n odd primes q = prime(k+1), k = 1, 2, ..., n, and (p|q) = -1 for q = prime(n+2). - _T. D. Noe_, Mar 06 2013
%e A096636 Let f(p) = list of Legendre(p|q) for q = 3,5,7,11,13,...
%e A096636 Then f(3), f(5), f(7), f(11), ... are:
%e A096636 p=3: 0, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, ...
%e A096636 p=5: -1, 0, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, ...
%e A096636 p=7: 1, -1, 0, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, ...
%e A096636 p=11: -1, 1, 1, 0, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 1, ...
%e A096636 p=13: 1, -1, -1, -1, 0, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, ...
%e A096636 p=17: -1, -1, -1, -1, 1, 0, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, ...
%e A096636 p=19: 1, 1, -1, -1, -1, 1, 0, -1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, ...
%e A096636 p=5 is the first list that begins with -1, so a(0) = 5,
%e A096636 p=7 is the first list that begins 1, -1, so a(1) = 7,
%e A096636 p=19 is the first list that begins 1, 1, -1, so a(2) = 19.
%t A096636 f[n_] := Block[{k = 2}, While[ JacobiSymbol[n, Prime[k]] == 1, k++ ]; Prime[k]]; t = Table[0, {50}]; Do[p = Prime[n]; a = f[p]; If[ t[[ PrimePi[a]]] == 0, t[[ PrimePi[a]]] = p; Print[ PrimePi[a], " = ", p]], {n, 10^9}]
%Y A096636 Cf. A094929, A222756 (p and q switched).
%Y A096636 See also A096637, A096638, A096639, A096640. - _Jonathan Sondow_, Mar 07 2013
%K A096636 nonn
%O A096636 0,1
%A A096636 _Robert G. Wilson v_, Jun 24 2004
%E A096636 Better definition from _T. D. Noe_, Mar 06 2013
%E A096636 Entry revised by _N. J. A. Sloane_, Mar 06 2013
%E A096636 Simpler definition from _Jonathan Sondow_, Mar 06 2013