I will use $n,D$ for the special values of interest only,
$$
\bbox[lightyellow]{\qquad
\begin{aligned}
n &= 192\ ,\\
D &= -4n=-768\ .
\end{aligned}\qquad}
$$
Following the reference ([Cox] below)
Cox, Primes of the form $x^2+ny^2$ [...] Theorem 9.2, §9.B and Examples in §9.C,
we are dealing with
the field
the order
$$
\begin{aligned}
K &=\Bbb Q(a)=\Bbb Q(\sqrt{-3})\ ,\qquad a=\sqrt{-3}\ ,
\\
&\qquad\text{ with integer basis $1$ and $w=\frac 12(1+a)$, and its order}
\\[2mm]
\mathcal O
&=\Bbb Z[\sqrt{-n}]\\
&=\Bbb Z\cdot 1 +\Bbb Z\cdot 8a=\Bbb Z\cdot 1 +\Bbb Z\cdot 16w
\end{aligned}
$$
of discriminant $D=-4n=-768$ and conductor $16$.
The ideal class group of the order $\mathcal O$ has the structure
$$
C(\mathcal O)\cong \Bbb Z/4\oplus\Bbb Z/2\ ,
$$
as pari/gp
shows it below. For the convenience of the reader, here is the adapted version of this theorem for our case.
Theorem 9.2 [Cox] and the particular case $\bf n=192$:
Let $n>0$ be an integer. There is a monic irreducible polynomial $f_n\in\Bbb Z[x]$ of degree $h(-4n)$ such that if an odd prime $p$ divides neither $n$ nor the discriminant of $f_n$ then:
$$
p = x^2+ny^2\Longleftrightarrow
\left\{
\begin{aligned}
&\left(\frac {-n}p\right)=1\text{ and}\\
&f_n(x)\equiv 0\text{ modulo $p$ has an integer solution.}
\end{aligned}
\right.
$$
Furthermore, $f_n(x)$ may be taken to be the minimal polnomial of a real algebraic integer $\alpha$ for which $L=K(\alpha)$ is the ring class field of the order $\mathcal O=\Bbb Z[\sqrt{-n}]$ in the imaginary quadratic field $K=\Bbb Q(\sqrt{-n})$.
Finally, if $f_n$ is any monic integer polynomial of degree $h(-4n)$ for which the above equivalence holds, then $f_n(x)$ is irreducible over $\Bbb Z$ and is the minimal polynomial of a primitive element of the ring class field $L$ described above.
For the special case $n=192$ we can take
$$
\bbox[lightyellow]{
\qquad
f_n(x) = (x^2-2)^4+9\ ,
\qquad}
$$ so $L$ can be taken to be the number field generated over $K$ by a root of this polynomial.
Some details follow now, parallel to the many chapters in [Cox].
Investigation of the binary quadratic forms with the given discriminant, here aided by pari/gp
, see also
https://pari.math.u-bordeaux.fr/pub/pari/manuals/2.3.5/tutorial.pdf , §10 , pages 27 - 31 .
the code fragments is just a quick way to
type elements, and may be also useful in similar situation:
? n = 192;
? D = -4*n;
? quadclassunit(D, , [1, 6])
%56 = [8, [4, 2], [Qfb(7, 4, 28), Qfb(12, 12, 19)], 1]
(The order of the class group is $8$, the invariant factors are $4,2$, representing generators are the binary quadratic forms $[a,b,c]=[ax^2+bxy+cy^2]$ given by $[7,4,28]$ and $[12,12, 19]$.)
To see them all, we may want compute:
? f = Qfb(7, 4, 28); g = Qfb(12, 12, 19);
? for(j=0, 3, for(k=0, 1, print("f^", j, " * g^", k, " = ", f^j * g^k)))
f^0 * g^0 = Qfb(1, 0, 192)
f^0 * g^1 = Qfb(12, 12, 19)
f^1 * g^0 = Qfb(7, 4, 28)
f^1 * g^1 = Qfb(13, -8, 16)
f^2 * g^0 = Qfb(4, 4, 49)
f^2 * g^1 = Qfb(3, 0, 64)
f^3 * g^0 = Qfb(7, -4, 28)
f^3 * g^1 = Qfb(13, 8, 16)
? \\ also note:
? f^4
%59 = Qfb(1, 0, 192)
? g^2
%60 = Qfb(1, 0, 192)
The $(j,k)$-loop shows all elements $f^jg^k$ in the class group,
$f, g$ being the generating binary quadratic forms (as classes) $f=[7,4,28]$, and $g=[12,12,19]$. They have orders $4,2$.
The neutral / principal element is $[1, 0, 192]=[1,0,n]$.
It is a square, and the only other square is $f^2=[4,4,49]$. This is the genus containing the principal form, $C(\mathcal O)^2$.
(Alternatively for the class number only we may ask for qfbclassno(D)
and obtain the 8
.)
Let us collect some experimental data now.
For $t=4$ the value $P(t)=(8+1)^4+16=6577$ is by chance a prime number.
We are searching for an integer solution/representation
$s^2+192x^2=6577$ for it.
There is no such solution in integers, concluded after a small $x$-loop, but there is one representation when we allow the denominator $2$ for $x$, i.e. for the related quadratic form $(S, X)\to S^2 + 48X^2$. We have
$(s_0,x_0)=(65,7/2)$, $(S_0,X_0)=(65, 7)$.
However, we have an integer representation for the other form in the principal genus, $4s^2+4sx+49x^2=6577$, it is $(s,x)=(29,7)$.
Similar examples can be given also for other values, it is maybe useful to collect this experimental data in a table for a first orientation:
$$
\tiny
\begin{array}{|r|r|c|c|c|}
\hline
t & P(t)& & s^2 + 192x^2=P(t)& 4s^2 + 4sx + 49x^2=P(t)\\\hline
1 & 97 & \text{PRIME} & (5/2,\ 11/16) & (3,\ 1)\\\hline
4 & 6577 & \text{PRIME} & (65,\ 7/2) & (29,\ 7)\\\hline
10 & 17^{2} \cdot 673 & & (425,\ 17/2) & (221,\ 17)\\\hline
13 & 531457 & \text{PRIME} & (247,\ 99/2) & (74,\ 99)\\\hline
22 & 4100641 & \text{PRIME} & (2023,\ 13/2) & (1005,\ 13)\\\hline
25 & 6765217 & \text{PRIME} & (295,\ 373/2) & (334,\ 373)\\\hline
28 & 10556017 & \text{PRIME} & (3103,\ 139/2) & (1482,\ 139)\\\hline
31 & 313 \cdot 50329 & & (1265,\ 543/2) & (1839,\ 301)\\\hline
37 & 4993 \cdot 6337 & & (3607,\ 623/2) & (1492,\ 623)\\\hline
43 & 57289777 & \text{PRIME} & (7553,\ 71/2) & (3812,\ 71)\\\hline
46 & 73 \cdot 1024729 & & (7495,\ 623/2) & (4059,\ 623)\\\hline
52 & 121550641 & \text{PRIME} & (8129,\ 1075/2) & (4602,\ 1075)\\\hline
55 & 2521 \cdot 60217 & & (3857,\ 1689/2) & (2773,\ 1689)\\\hline
70 & 395254177 & \text{PRIME} & (9497,\ 2521/2) & (6009,\ 2521)\\\hline
73 & 466948897 & \text{PRIME} & (21415,\ 417/2) & (10916,\ 417)\\\hline
79 & 639128977 & \text{PRIME} & (24655,\ 807/2) & (11924,\ 807)\\\hline
94 & 1275989857 & \text{PRIME} & (34745,\ 1197/2) & (16774,\ 1197)\\\hline
97 & 3433 \cdot 421177 & & (31673,\ 3037/2) & (14318,\ 3037)\\\hline
103 & 1836036817 & \text{PRIME} & (42833,\ 169/2) & (21501,\ 169)\\\hline
127 & 1129 \cdot 3745129 & & (60943,\ 3273/2) & (25073,\ 7025)\\\hline
130 & 4640470657 & \text{PRIME} & (36727,\ 8281/2) & (22504,\ 8281)\\\hline
133 & 26713 \cdot 190249 & & (23767,\ 9701/2) & (33844,\ 4863)\\\hline
139 & 193 \cdot 31394929 & & (2623,\ 11229/2) & (9871,\ 11167)\\\hline
160 & 73 \cdot 145444489 & & (71503,\ 10709/2) & (41106,\ 10709)\\\hline
166 & 27457 \cdot 447841 & & (92455,\ 8837/2) & (50646,\ 8837)\\\hline
178 & 97 \cdot 9241 \cdot 18121 & & (117065,\ 7273/2) & (17386,\ 16821)\\\hline
184 & 18539817937 & \text{PRIME} & (48593,\ 18359/2) & (33476,\ 18359)\\\hline
190 & 141793 \cdot 148609 & & (137095,\ 6887/2) & (20458,\ 20749)\\\hline
199 & 25344958417 & \text{PRIME} & (85615,\ 19373/2) & (52494,\ 19373)\\\hline
202 & 26904200641 & \text{PRIME} & (131479,\ 14155/2) & (72817,\ 14155)\\\hline
205 & 28534304257 & \text{PRIME} & (161993,\ 6911/2) & (84452,\ 6911)\\\hline
223 & 39923636497 & \text{PRIME} & (101297,\ 24859/2) & (38219,\ 24859)\\\hline
226 & 42110733697 & \text{PRIME} & (129463,\ 22981/2) & (53241,\ 22981)\\\hline
232 & 41281 \cdot 1132561 & & (117137,\ 26233/2) & (107855,\ 9293)\\\hline
235 & 409 \cdot 120326233 & & (180223,\ 18671/2) & (99447,\ 18671)\\\hline
241 & 601 \cdot 90555337 & & (226375,\ 8137/2) & (109119,\ 8137)\\\hline
247 & 60037250641 & \text{PRIME} & (226577,\ 13463/2) & (106557,\ 13463)\\\hline
253 & 337 \cdot 196065841 & & (150583,\ 30069/2) & (90326,\ 30069)\\\hline
256 & 226777 \cdot 305401 & & (112975,\ 34307/2) & (101312,\ 20209)\\\hline
268 & 82129 \cdot 1012513 & & (160735,\ 34557/2) & (63089,\ 34557)\\\hline
277 & 73 \cdot 1299717817 & & (61207,\ 43573/2) & (52390,\ 43573)\\\hline
286 & 1249 \cdot 86308993 & & (241913,\ 32041/2) & (162548,\ 15969)\\\hline
\end{array}
$$
So all the time the odd(est) prime two is in the way of $[1,0,192]$,
and always $[4,4,49]$ is winning.
For the computation of $f_n$ i followed the receipt in §9, §11 in loc. cit searching for subfields dihedral Galois structure. So far, here are some polynomials of degree $8$ that experimentally work up to some higher bound for tested prime numbers:
$$
\begin{aligned}
& x^{8} - 8 x^{7} - 56 x^{6} + 64 x^{5} + 2592 x^{4} + 11840 x^{3} + 30400 x^{2} + 32000 x + 40000\\
& x^{8} - 48 x^{7} + 736 x^{6} - 1408 x^{5} + 7232 x^{4} - 15872 x^{3} + 27648 x^{2} - 20480 x + 25600\\
& x^{8} - 8 x^{7} - 24 x^{6} + 160 x^{5} + 800 x^{4} - 832 x^{3} + 64 x^{2} + 64\\
& x^{8} - 8 x^{7} - 24 x^{6} + 352 x^{5} - 736 x^{4} - 2368 x^{3} + 16960 x^{2} - 38400 x + 40000\\
& x^{8} - 8 x^{7} - 72 x^{6} + 448 x^{5} + 2000 x^{4} - 3712 x^{3} - 23552 x^{2} - 58368 x - 40064\\
& x^{8} - 8 x^{7} - 24 x^{6} + 160 x^{5} + 880 x^{4} - 3072 x^{3} + 1920 x^{2} - 27648 x + 67968\\
& x^{8} - 8 x^{7} + 8 x^{6} + 96 x^{5} - 208 x^{4} + 1664 x^{2} - 2048 x + 1408\\
\end{aligned}
$$
The third polynomial in the list looks nice. We let sage give us its subfields of degree four, take a defining polynomial, and let this polynomial be factorized over $\Bbb Q(i)$. (Here, $i$ was a choice after looking at the subfields of degree two.) It turns out that a factor like $(x^2 - 2(1+4i)x - 39 + 8i$ shows up. Its (half)discriminant is $(1+4i)^2+39-8i=24=3i(1+i)^6$. So we may want to adjoin $\sqrt{3i}$, which leads to further adjoining $b=\sqrt 6$. We let than factor the third polynomial in the list over $\Bbb Q(i,b)$, and the shown factors lead to taking the root of $8-2b-2ib$. And half of $\sqrt(8-2b-2ib)$ has the minimal polynomial
sage: (1/2*sqrt(8 - 2*sqrt(6) - 2*sqrt(-6))).minpoly()
x^8 - 8*x^6 + 24*x^4 - 32*x^2 + 25
which is $(x^2-2)^4+9$.
The table was genarated by the sage code:
P = lambda t: (2*t + 1)^4 + 16
Q = DiagonalQuadraticForm(QQ, [1, 192])
R = QuadraticForm(QQ, 2, [4, 4, 49])
for t in [0..300]:
try:
pt = P(t)
info = "\\text{PRIME}" if pt.is_prime() else ""
sQ, xQ = Q.solve(pt)
sR, xR = R.solve(pt)
sQ, xQ, sR, xR = abs(sQ), abs(xQ), abs(sR), abs(xR)
print(f"{t:>4} & {latex(pt.factor())} & "
f"{info}"
f" & ({sQ},\\ {xQ}) & ({sR},\\ {xR})\\\\\\hline")
except ArithmeticError:
pass
The code for the polynomials of degree $8$ above is:
x^8 - 8*x^7 - 56*x^6 + 64*x^5 + 2592*x^4 + 11840*x^3 + 30400*x^2 + 32000*x + 40000
x^8 - 48*x^7 + 736*x^6 - 1408*x^5 + 7232*x^4 - 15872*x^3 + 27648*x^2 - 20480*x + 25600
x^8 - 8*x^7 - 24*x^6 + 160*x^5 + 800*x^4 - 832*x^3 + 64*x^2 + 64
x^8 - 8*x^7 - 24*x^6 + 352*x^5 - 736*x^4 - 2368*x^3 + 16960*x^2 - 38400*x + 40000
x^8 - 8*x^7 - 72*x^6 + 448*x^5 + 2000*x^4 - 3712*x^3 - 23552*x^2 - 58368*x - 40064
x^8 - 8*x^7 - 24*x^6 + 160*x^5 + 880*x^4 - 3072*x^3 + 1920*x^2 - 27648*x + 67968
x^8 - 8*x^7 + 8*x^6 + 96*x^5 - 208*x^4 + 1664*x^2 - 2048*x + 1408
They were obtained by asking for the subfields of degree eight of the ray class field obtained via
`pari.quadray(-3, 16)`
To put the hands on the subfields, one may try
F.<y> = CyclotomicField(6)
RF.<X> = PolynomialRing(F)
f = pari.quadray(-3, 16)
N.<v> = NumberField(RF(f))
And then we use Theorem 9.2 again to rule out some of the subields of degree eight, that do not work for our $n$.
Here is a computer check for primes up to some bound that the claimed $f_n$ works.
R.<X> = PolynomialRing(ZZ)
f = (X^2 - 2)^4 + 9
q = BinaryQF([1, 0, 192])
def check(bound=10^8, verbose=False):
ok = True
for p in primes(bound):
sols = Q.solve_integer(p)
kron = bool(kronecker(-n, p) == 1)
roots = f.base_extend(GF(p)).roots(GF(p), multiplicities=0)
if verbose:
print(f"p = {p:>3} | {sols} | {kron:<5} | {roots}")
ok = bool(sols) == bool(kron and roots)
if not ok: break
return ok
Then the check up to the default bound is:
sage: check()
True
A verbose check with a lower bound may be started with check(bound=1000, verbose=True)
.