login

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

Smallest prime p modulo which numbers 1,2,...,n are quadratic residues.
4

%I #8 May 13 2013 01:54:10

%S 2,7,23,23,71,71,311,311,311,311,479,479,1559,1559,1559,1559,5711,

%T 5711,10559,10559,10559,10559,18191,18191,18191,18191,18191,18191,

%U 31391,31391,366791,366791,366791,366791,366791,366791,366791,366791,366791

%N Smallest prime p modulo which numbers 1,2,...,n are quadratic residues.

%C The same primes without repetitions are listed in A147970.

%H Charles R Greathouse IV, <a href="/A147969/b147969.txt">Table of n, a(n) for n = 1..100</a>

%o (PARI) a(n)=forprime(p=2,default(primelimit),forprime(i=2,n, if(kronecker(i,p)<1,next(2)));return(p)) \\ _Charles R Greathouse IV_, Apr 06 2012

%Y Cf. A000229, A002223, A002224, A045535, A053760, A133435, A147970, A147971.

%K nonn

%O 1,1

%A _Max Alekseyev_, Nov 18 2008