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.

A212603 a(n) is the smallest prime such that it and the previous two primes are all of the form x^2 + n * y^2.

This page as a plain text file.
%I A212603 #9 Dec 09 2017 04:00:30
%S A212603 101,97,163,101,3061,1777,113,2617,8353,419,4937,8353,3457,34729,8209,
%T A212603 2617,53201,2203,4253,12301,54049,991,6803,232801,3061,11491,739,2237,
%U A212603 32297,68329,857,19801,12853,7411,53299,28081,941,14503,20107,88729,23993,23251
%N A212603 a(n) is the smallest prime such that it and the previous two primes are all of the form x^2 + n * y^2.
%e A212603 a(2)=97 since 97 = 25 + 2*36, 89 = 81 + 2*4, 83 = 81 + 2*1.
%t A212603 Table[again = True; lim = 10; While[again, lim2 = lim/Sqrt[n];  t = PrimePi[Select[Union[Flatten[Table[x^2 + n y^2, {x, 0, lim}, {y, 0, lim2}]]], # < lim^2 && PrimeQ[#] &]]; i = 1; While[i < Length[t] - 1 && (t[[i]] + 1 < t[[i + 1]] ||  t[[i+1]] + 1 < t[[i+2]]), i++]; If[i < Length[t] - 1, again = False; ans = Prime[t[[i+2]]], lim = 10*lim]]; ans, {n, 42}] (* _T. D. Noe_, May 23 2012 *)
%K A212603 nonn
%O A212603 1,1
%A A212603 _John L. Drost_, May 22 2012