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.

A002224 Smallest prime p of form p = 8k+1 such that first n primes (p_1=2, ..., p_n) are quadratic residues mod p.

This page as a plain text file.
%I A002224 M5040 N2176 #51 Oct 17 2024 23:06:13
%S A002224 17,73,241,1009,2689,8089,33049,53881,87481,483289,515761,1083289,
%T A002224 3818929,3818929,9257329,22000801,48473881,48473881,175244281,
%U A002224 427733329,427733329,898716289,8114538721,9176747449,23616331489,23616331489,23616331489,196265095009,196265095009,196265095009,196265095009,2871842842801,2871842842801,2871842842801,26437680473689
%N A002224 Smallest prime p of form p = 8k+1 such that first n primes (p_1=2, ..., p_n) are quadratic residues mod p.
%D A002224 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D A002224 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%D A002224 A. E. Western and J. C. P. Miller, Tables of Indices and Primitive Roots. Royal Society Mathematical Tables, Vol. 9, Cambridge Univ. Press, 1968, p. XV.
%H A002224 Michael Hortmann, <a href="/A002224/b002224.txt">Table of n, a(n) for n = 1..41</a>
%H A002224 D. H. Lehmer, <a href="https://doi.org/10.1090/S0025-5718-1954-0063388-X">A sieve problem on "pseudo-squares"</a>, Math. Tables Other Aids Comp., 8 (1954), 241-242.
%H A002224 D. H. Lehmer, E. Lehmer and D. Shanks, <a href="https://doi.org/10.1090/S0025-5718-1970-0271006-X">Integer sequences having prescribed quadratic character</a>, Math. Comp., 24 (1970), 433-451.
%H A002224 D. H. Lehmer, E. Lehmer and D. Shanks, <a href="/A002189/a002189.pdf">Integer sequences having prescribed quadratic character</a>, Math. Comp., 24 (1970), 433-451 [Annotated scanned copy]
%H A002224 A. E. Western and J. C. P. Miller, <a href="/A002223/a002223.pdf">Tables of Indices and Primitive Roots</a>, Royal Society Mathematical Tables, Vol. 9, Cambridge Univ. Press, 1968 [Annotated scans of selected pages]
%e A002224 32^2 = 2 mod 73, 21^2 = 3 mod 73.
%t A002224 f[n_] := Block[{k = 2}, While[JacobiSymbol[n, Prime[k]] == 1, k++ ]; Prime[k]] (* _Robert G. Wilson v_ *)
%t A002224 np[] := While[p = NextPrime[p]; Mod[p, 8] != 1]; p = 2; A002224 = {}; pp = {2}; np[]; While[Length[A002224] < 25, If[Union[JacobiSymbol[#, p] &[pp]] === {1}, AppendTo[pp, NextPrime[Last[pp]]]; Print[p]; AppendTo[A002224, p], np[]]]; A002224 (* _Jean-François Alcover_, Sep 09 2011 *)
%o A002224 (PARI) a(n,startAt=17)=my(v=primes(n)); forprime(p=startAt,, if(p%8>1, next); for(i=1,n, if(kronecker(v[i],p)<1, next(2))); return(p)) \\ _Charles R Greathouse IV_, Jun 26 2017
%Y A002224 Cf. A002223, A002225, A002226.
%K A002224 nonn,nice
%O A002224 1,1
%A A002224 _N. J. A. Sloane_
%E A002224 More terms from _Don Reble_, Sep 19 2001
%E A002224 More terms from _Mike Oakes_, Nov 28 2022