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.

A338087 a(n) is the smallest prime number which can be represented as x^2 + h*y^2 with x > 0 and y > 0 for each h in the first n Heegner numbers (A003173).

This page as a plain text file.
%I A338087 #41 Jan 08 2021 21:49:27
%S A338087 2,17,73,193,1873,20353,20353,79633,2333017
%N A338087 a(n) is the smallest prime number which can be represented as x^2 + h*y^2 with x > 0 and y > 0 for each h in the first n Heegner numbers (A003173).
%C A338087 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 A003173 (Heegner numbers). See examples.
%e A338087 a(1) = 2 because, for A003173(1) = 1, 2 = 1^2+A003173(1)*1^2.
%e A338087 a(2) = 17 because, considered the first two Heegner numbers, A003173(1) = 1 and A003173(2) = 2, 17 = 1^2+A003173(1)*4^2 = 3^2+A003173(2)*2^2.
%e A338087 The prime 20353 is present in the sequence 2 times because:
%e A338087 a(6) = 63^2+A003173(1)*128^2 = 79^2+A003173(2)*84^2 = 55^2+A003173(3)*76^2 = 65^2+A003173(4)*48^2 = 137^2+A003173(5)*12^2 = 97^2+A003173(6)*24^2, with Heegner numbers up to A003173(6)=19, and also:
%e A338087 a(7) = 119^2+A003173(7)*12^2, with Heegner number A003173(7)=43.
%e A338087 2333017 is the last term of the sequence since for every Heegner number h there are x, y such that 2333017 = x^2 + h*y^2 and this is the least prime for which this is possible.
%e A338087 For n=9, h in A003173 = {1,2,3,7,11,19,43,67,163},
%e A338087    a(9) = 2333017
%e A338087           = 989^2  +A003173(1)*1164^2
%e A338087           = 1493^2 +A003173(2)*228^2
%e A338087           = 1093^2 +A003173(3)*616^2
%e A338087           = 685^2  +A003173(4)*516^2
%e A338087           = 1349^2 +A003173(5)*216^2
%e A338087           = 179^2  +A003173(6)*348^2
%e A338087           = 1293^2 +A003173(7)*124^2
%e A338087           = 1395^2 +A003173(8)*76^2
%e A338087           = 1485^2 +A003173(9)*28^2.
%o A338087 (PARI)
%o A338087 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 A338087 a(n)={my(u=[1, 2, 3, 7, 11, 19, 43, 67, 163][1..n]); forprime(p=2, oo, if(isok(p,u), return(p)))}
%o A338087 vector(9, n, a(n)) \\ _Andrew Howroyd_, Nov 05 2020
%Y A338087 Cf. A003173.
%K A338087 fini,full,nonn
%O A338087 1,1
%A A338087 _Marco Frigerio_, Oct 09 2020