(Magma) SetClassGroupBounds("GRH"); p:=3; dList:=
A269319; for d in dList do
ZX<X>:=PolynomialRing(Integers()); K:=NumberField(X^2-d); O:=MaximalOrder(K); C, mC:=ClassGroup(O); sS:=Subgroups(C: Quot:=[p]); sI:=[]; for j in [1..p+1] do Append(~sI, 0); end for; n:=Ngens(C); g:=(Order(C.(n-1)) div p)*C.(n-1); h:=(Order(C.n) div p)*C.n; ct:=0; for x in sS do ct:=ct+1; if g in x`subgroup then sI[1]:=ct; end if; if h in x`subgroup then sI[2]:=ct; end if; for e in [1..p-1] do if g+e*h in x`subgroup then sI[e+2]:=ct; end if; end for; end for; sA:=[AbelianExtension(Inverse(mQ)*mC) where Q, mQ:=quo<C|x`subgroup>: x in sS];
sN:=[NumberField(x): x in sA]; sR:=[MaximalOrder(x): x in sA];
sF:=[AbsoluteField(x): x in sN]; sM:=[MaximalOrder(x): x in sF];
sM:=[OptimizedRepresentation(x): x in sF];
sA:=[NumberField(DefiningPolynomial(x)): x in sM]; sO:=[Simplify(LLL(MaximalOrder(x))): x in sA];
TTT:=[]; epsilon:=0; polarization1:=3; polarization2:=3; for j in [1..#sO] do CO:=ClassGroup(sO[j]); Append(~TTT, pPrimaryInvariants(CO, p));
if (3 eq #pPrimaryInvariants(CO, p)) then epsilon:=epsilon+1; end if; val:=Valuation(Order(CO), p); if (2 eq val) then polarization2:=val; elif (4 le val) then if (3 eq polarization1) then polarization1:=val; else polarization2:=val; end if; end if; end for; TKT:=[]; for j in [1..#sR] do Collector:=[]; I:=sR[j]!!mC(g); if IsPrincipal(I) then Append(~Collector, sI[1]); end if;
I:=sR[j]!!mC(h); if IsPrincipal(I) then Append(~Collector, sI[2]); end if;
for e in [1..p-1] do I := sR[j]!!mC(g+e*h); if IsPrincipal(I) then Append(~Collector, sI[e+2]); end if; end for;
if (2 le #Collector) then Append(~TKT, 0); else Append(~TKT, Collector[1]); end if; end for; TAB:=[]; image:=[]; fixedpoints:=0; capitulations:=0;
for j in [1..#TKT] do if (j eq TKT[j]) then Append(~TAB, "A"); fixedpoints:=fixedpoints+1;
elif (0 eq TKT[j]) then Append(~TAB, "A"); capitulations:=capitulations+1;
else Append(~TAB, "B"); end if;
if not (TKT[j] in image) then Append(~image, TKT[j]); end if; end for;
if (2 eq polarization2) and (3 eq polarization1) and (0 eq epsilon) and (1 eq fixedpoints) then printf "%o, ", d; end if; end for;
// On 04 April 2016, Magma version V2.21-11 was released for Mac OS, and is able to execute the PROG. -
Daniel Constantin Mayer, Apr 16 2016