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 A338088 #59 Jan 08 2021 21:49:51 %S A338088 2,17,73,73,241,241,1009,1009,1009,1009,1009,2521,2521,2521,2521,2521, %T A338088 8089,8089,8089,8089,8089,8089,19009,19009,19009,19009,19009,19009, %U A338088 53881,53881,53881,53881,53881,53881,53881,605641,605641,605641,605641,605641,605641 %N 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. %C A338088 The sequence lists prime numbers, in nondecreasing order, such that each of them can be written, in a unique way, in the form x^2 + h*y^2, where x, y are natural numbers, while h takes an increasing number of values of the sequence A000926 (idoneal numbers). See examples. %H A338088 Marco Frigerio, <a href="/A338088/b338088.txt">Table of n, a(n) for n = 1..65</a> %e A338088 a(1) = 2 because, for A000926(1) = 1, 2 = 1^2+A000926(1)*1^2. %e A338088 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. %e A338088 The prime 1009 is present in the sequence 5 times because: %e A338088 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: %e A338088 a(8) = 19^2+8*9^2, %e A338088 a(9) = 28^2+9*5^2, %e A338088 a(10) = 3^2+10*10^2, %e A338088 a(11) = 31^2+12*2^2, %e A338088 with idoneal numbers from A000926(8) to A000926(11). %e A338088 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. %o A338088 (PARI) %o A338088 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} %o A338088 idoneal()={select(m->!#select(k->k<>2, quadclassunit(-4*m).cyc), [1..1848])} %o A338088 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 %Y A338088 Cf. A000926. %K A338088 nonn,fini,full %O A338088 1,1 %A A338088 _Marco Frigerio_, Oct 09 2020