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.
%I A173274 #30 Oct 08 2018 08:14:01 %S A173274 18481,19009,19441,20161,21961,31249,41281,47041,48409,51241,68209, %T A173274 70009,70921,74209,74449,74761,75289,76129,76561,77641,80809,84121, %U A173274 85369,86689,87649,90841,91081,91921,93241,97441,102001,102481,106681 %N A173274 Primes of the form x^2 + 18480*y^2. %C A173274 The primes p of the form x^2 + 18480*y^2 are also of the multi-forms x^2 + y^2, x^2 + 2*y^2, x^2 + 3*y^2, ..., x^2 + 11*y^2, x^2 + 12*y^2, but the reverse is false. For example, p = 7561 has twelve forms, but is not of the form x^2 + 18480*y^2. %D A173274 David A. Cox, "Primes of the Form x^2 + n*y^2", Wiley, 1989, Section 3. %D A173274 J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 1848, p. 146, Ellipses, Paris 2008. %H A173274 Ray Chandler, <a href="/A173274/b173274.txt">Table of n, a(n) for n = 1..10000</a> %H A173274 N. J. A. Sloane et al., <a href="https://oeis.org/wiki/Binary_Quadratic_Forms_and_OEIS">Binary Quadratic Forms and OEIS</a> (Index to related sequences, programs, references) %H A173274 M. Waldschmidt, <a href="https://arxiv.org/abs/math/0312440">Open Diophantine problems</a>, arXiv:math/0312440 [math.NT], 2003-2004. %e A173274 18481 = 1^2 + 18480*1^2 and also 18481 = 16^2 + 135^2 = 7^2 + 2*96^2 = 127^2 + 3*28^2 = 135^2 + 4*8^2 = 74^2 + 5*51^2 = 59^2 + 6*50^2 = 97^2 + 7*36^2 = 7^2 + 8*48^2 = 16^2 + 9*45^2 = 29^2 + 10*42^2 = 65^2 + 11*36^2 = 127^2 + 12*14^2. %p A173274 fd:=proc(a,b,c,M) local dd,xlim,ylim,x,y,t1,t2,t3,t4,i; %p A173274 dd:=4*a*c-b^2; %p A173274 if dd<=0 then error "Form should be positive definite."; break; fi; %p A173274 t1:={}; %p A173274 xlim:=ceil( sqrt(M/a)*(1+abs(b)/sqrt(dd))); %p A173274 ylim:=ceil( 2*sqrt(a*M/dd)); %p A173274 for x from 0 to xlim do %p A173274 for y from -ylim to ylim do %p A173274 t2 := a*x^2+b*x*y+c*y^2; %p A173274 if t2 <= M then t1:={op(t1),t2}; fi; od: od: %p A173274 t3:=sort(convert(t1,list)); %p A173274 t4:=[]; %p A173274 for i from 1 to nops(t3) do %p A173274 if isprime(t3[i]) then t4:=[op(t4),t3[i]]; fi; od: %p A173274 [[seq(t3[i],i=1..nops(t3))], [seq(t4[i],i=1..nops(t4))]]; %p A173274 end; %p A173274 fd(1,0,18480,100000); %t A173274 QuadPrimes2[1, 0, 18480, 100000] (* see A106856 *) %t A173274 (* Second program: *) %t A173274 max = 107000; m = 18480; Table[yy = {y, 1, Floor[Sqrt[max-x^2]/(Sqrt[m])]}; Table[x^2 + m y^2, yy // Evaluate], {x, 0, Floor[Sqrt[max]]}] // Flatten // Union // Select[#, PrimeQ]& %o A173274 (PARI) %o A173274 fc(a,b,c,M) = { %o A173274 my(t1=List(),t2); %o A173274 forprime(p=2,prime(M), %o A173274 t2 = qfbsolve(Qfb(a,b,c),p); %o A173274 if(t2 != 0, listput(t1,p)) %o A173274 ); %o A173274 Vec(t1) %o A173274 }; %o A173274 fc(1,0,18480,100000) %Y A173274 Cf. A139668: primes of the form x^2 + 1848*y^2; %Y A173274 Cf. A139665: primes of the form x^2 + 840*y^2. %K A173274 nonn %O A173274 1,1 %A A173274 _Michel Lagneau_, Feb 14 2010, Jun 08 2010 %E A173274 Corrected sequence and replaced defective program. - _Ray Chandler_, Aug 14 2014