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.

A147972 Smallest prime p modulo which the first n primes are nonzero quadratic residues.

This page as a plain text file.
%I A147972 #18 Feb 18 2019 12:05:54
%S A147972 7,23,71,311,479,1559,5711,10559,18191,31391,366791,366791,366791,
%T A147972 3818929,9257329,22000801,36415991,48473881,120293879,120293879,
%U A147972 131486759,131486759,2929911599,2929911599,7979490791,23616331489,23616331489,89206899239,121560956039,196265095009,196265095009,513928659191,5528920734431,8402847753431,8402847753431,8402847753431,70864718555231
%N A147972 Smallest prime p modulo which the first n primes are nonzero quadratic residues.
%C A147972 The same primes without repetitions are listed in A147970.
%C A147972 a(n) <= min{A002223(n), A002224(n)}. What is the smallest n for which this inequality is strict?
%C A147972 By definition, a(n) == 1, 7 (mod 8), so a(n) = min{A002223(n), A002224(n)}. - _Jianing Song_, Feb 18 2019
%F A147972 a(n) >= min{A002189(n-1), A045535(n-1)}. - _Jianing Song_, Feb 18 2019
%t A147972 (*version 7.0*)m=1;P=7;Lst={p};While[m<25,m++;S=Prime[Range[m]];While[MemberQ[JacobiSymbol[S,p],-1],p=NextPrime[p]];Lst=Append[Lst,P]];Lst (* _Emmanuel Vantieghem_, Jan 31 2012 *)
%o A147972 (PARI) t=2;forprime(p=2,1e9,forprime(q=2,t,if(kronecker(q,p)<1,next(2)));print1(p", ");t=nextprime(t+1);p--) \\ _Charles R Greathouse IV_, Jan 31 2012
%Y A147972 Cf. A000229, A002189, A002223, A002224, A045535, A053760, A133435, A147969, A147970, A147971.
%Y A147972 Smallest prime p such that each of the first n primes has q q-th roots mod p: this sequence (q=2), A002225 (q=3), A002226 (q=5), A002227 (q=7), A002228 (q=11), A060363 (q=13), A060364 (q=17).
%K A147972 nonn
%O A147972 1,1
%A A147972 _Max Alekseyev_, Nov 18 2008
%E A147972 a(23)-a(25) from _Emmanuel Vantieghem_, Jan 31 2012
%E A147972 a(26)-a(37) from _Max Alekseyev_, Aug 21 2015