%I #137 Apr 01 2021 23:09:36
%S 2333017,5995081,11414209,11941273,12953593,14823769,18550849,
%T 19231969,23582161,26603977,27336457,29236729,32630161,35452033,
%U 35836249,37895089,40411177,42911257,46007329,46087057,49680577,49825609,52046593,52208017,55624297,63257401
%N Primes that can be written in the form j^2 + h*k^2, where j and k are positive integers, for every h in A003173 (Heegner numbers).
%C The first term in this sequence is equal to last term in A338087.
%C The sequence is obtained using Lista(m), with m=633*10^5, see section PROG. One can increase m to obtain further terms of the sequence.
%e 2333017 = 989^2 + A003173(1)*1164^2
%e = 1493^2 + A003173(2)*228^2
%e = 1093^2 + A003173(3)*616^2
%e = 685^2 + A003173(4)*516^2
%e = 1349^2 + A003173(5)*216^2
%e = 179^2 + A003173(6)*348^2
%e = 1293^2 + A003173(7)*124^2
%e = 1395^2 + A003173(8)*76^2
%e = 1485^2 + A003173(9)*28^2.
%o (PARI) Heegner()={my (d, k, v); v=vector(3, i, i); for(k=2, 41, d=4*k-1; if(isprime(d) && qfbclassno(-d)==1, v=concat(v, d))); return(v);}
%o isok(p,u)={my (i, s, n=matsize(u)[2], t=0);for(i=1, n, s=kronecker(-u[i],p); if(s==1, t++,break));if(t==n,t=0;for(i=1, n, s=qfbsolve(Qfb(1,0,u[i]),p); if(s==[], break,t++)));if(t==n,1,0)}
%o Primo(p, m)={my(u=Heegner()); while(p<m, p=nextprime(p+1); if(isok(p,u),return(p)));return(0)}
%o Lista(m)={my (q,r=233*10^4,v=[]); q=nextprime(r); m=precprime(m); while(q<m,r=q;q=Primo(r,m);if(q>r,v=concat(v,q),q=m)); return(v);}
%Y Cf. A003173, A338087.
%K nonn
%O 1,1
%A _Marco Frigerio_, Dec 29 2020
|