A338088 Smallest prime numbers which can be represented as x^2 + h*y^2 with x > 0 for every h in the first n idoneal numbers.
2, 17, 73, 73, 241, 241, 1009, 1009, 1009, 1009, 1009, 2521, 2521, 2521, 2521, 2521, 8089, 8089, 8089, 8089, 8089, 8089, 19009, 19009, 19009, 19009, 19009, 19009, 53881, 53881, 53881, 53881, 53881, 53881, 53881, 605641, 605641, 605641, 605641, 605641, 605641
Offset: 1
Examples
a(1) = 2 because, for A000926(1) = 1, 2 = 1^2+A000926(1)*1^2. a(2) = 17 because, considered the first two idoneal numbers, A000926(1) = 1 and A000926(2) = 2, 17 = 1^2+A000926(1)*4^2 = 3^2+A000926(2)*2^2. The prime 1009 is present in the sequence 5 times because: a(7) = 15^2+1*28^2 = 19^2+2*18^2 = 31^2+3*4^2 = 15^2+4*14^2 = 17^2+5*12^2 = 25^2+6*12^2 = 1^2+7*12^2, with idoneal numbers up to A000926(7), and also: a(8) = 19^2+8*9^2, a(9) = 28^2+9*5^2, a(10) = 3^2+10*10^2, a(11) = 31^2+12*2^2, with idoneal numbers from A000926(8) to A000926(11). 1083289 is the last term of the sequence since for every idoneal number h there are x, y such that 1083289 = x^2 + h*y^2 and this is the least prime for which this is possible.
Links
- Marco Frigerio, Table of n, a(n) for n = 1..65
Crossrefs
Cf. A000926.
Programs
-
PARI
isok(p,u)={for(i=1, #u, my(s=qfbsolve(Qfb(1,0,u[i]),p)); if(s==0 || s[1]==0, return(0))); 1} idoneal()={select(m->!#select(k->k<>2, quadclassunit(-4*m).cyc), [1..1848])} seq()={my(u=idoneal(), v=[1], L=List()); forprime(p=2, oo, if(isok(p,v), listput(L,p); my(k=#v); while(k<#u && isok(p,[u[k+1]]), listput(L,p); k++); if(k==#u, return(Vec(L))); v=u[1..k+1]))} \\ Andrew Howroyd, Nov 05 2020
Comments