K<p> := pAdicField(3);
K`SeriesPrinting := true;
heights := [];


// ** 389A **: Elliptic Curve defined by y^2 + y = x^3 + x^2 - 2*x over Rational Field

// Q(sqrt(-11))

heights[1] := [* <"389A", -11, [* <false, false>, <-4054834521710959438*3^-3 + O(p^37), 4734502197939836345*3^-3 + O(p^37)>,
<-5128451143030415824*3^-3 + O(p^37), 184944463937779316*3^-3 + O(p^37)>,
<-4233587810120733751*3^-3 + O(p^37), 5449450017977127950*3^-3 + O(p^37)>
*]> *];


// ** 433A **: Elliptic Curve defined by y^2 + x*y = x^3 + 1 over Rational Field

// Q(sqrt(-8))

heights[2] := [* <"433A", -8, [*
<-291315411869673877*3^-1 + O(p^39), false>,
<-3822008204613305447*3^-2 + O(p^38), -3112286436193297540*3^-2 + O(p^38)>,
<3737976811705656244*3^-2 + O(p^38), 4481636830969682309*3^-2 + O(p^38)>,
<-4171348572200177903*3^-2 + O(p^38), 2968081566999880118*3^-2 + O(p^38)>
*]> *];


// ** 446D **: Elliptic Curve defined by y^2 + x*y = x^3 - x^2 - 4*x + 4 over Rational Field

// Q(sqrt(-23))

heights[3] := [* <"446D", -23, [*
<4889205826410188336*3^-2 + O(p^38), false>,
<false, false>, <false, false>, <2966449211307770182*3^-7 + O(p^33), false>
*]> *];


// ** 563A **: Elliptic Curve defined by y^2 + x*y + y = x^3 + x^2 - 15*x + 16 over Rational Field

// Q(sqrt(-8))

heights[4] := [**];


// ** 571B **: Elliptic Curve defined by y^2 + y = x^3 + x^2 - 4*x + 2 over Rational Field

// Q(sqrt(-8))

heights[5] := [* <"571B", -8, [*
<-1782454760770426910*3^-1 + O(p^39), 3778404476646802307 + O(p^40)>,
<4305413687616553349*3^-2 + O(p^38), -2702125882048523978*3^-3 + O(p^37)>,
<2450010421639998875*3^-2 + O(p^38), -1498804411813247603*3^-3 + O(p^37)>,
<-1125839608013336218*3^-2 + O(p^38), 1655068396078319938*3^-3 + O(p^37)>
*]> *];


// ** 643A **: Elliptic Curve defined by y^2 + x*y = x^3 - 4*x + 3 over Rational Field

// Q(sqrt(-8))

heights[6] := [* <"643A", -8, [*
<false, 1819123308739170151*3^-1 + O(p^39)>,
<false, 5037002409645970538*3^-3 + O(p^37)>,
<false, -3113590887348738160*3^-3 + O(p^37)>,
<false, 2062975139883612320*3^-3 + O(p^37)>
*]> *];


// ** 655A **: Elliptic Curve defined by y^2 + y = x^3 - 13*x + 18 over Rational Field

// Q(sqrt(-56))

heights[7] := [* <"655A", -56, [*
<false, -3132389174079978272*3 + O(p^41)>,
<false, -1453867404683136053*3^-3 + O(p^37)>,
<-4028903459026151389*3^-5 + O(p^35), false>,
<false, 3035093387808238001*3^-6 + O(p^34)>
*]> *];


// ** 664A **: Elliptic Curve defined by y^2 = x^3 - 7*x + 10 over Rational Field

// Q(sqrt(-47))

heights[8] := [* <"664A", -47, [*
<4926314537163462334*3^-1 + O(p^39), -1945641455192181074*3^-1 + O(p^39)>,
<false, false>, <false, false>, <-3910325727473192560*3^-6 + O(p^34), -3912984832032276275*3^-6 + O(p^34)>
*]> *];

heights[9] := [* *];


// ** 707A **: Elliptic Curve defined by y^2 + y = x^3 + x^2 - 12*x + 12 over Rational Field

// Q(sqrt(-20))

heights[10] := [* <"707A", -20, [*
<2863442244926934637*3^-1 + O(p^39), false>,
<618680693762694655*3^-1 + O(p^39), 4967281568111578394*3^-2 + O(p^38)>,
<253124222861028157*3^-1 + O(p^39), 2167093244472804311*3^-2 + O(p^38)>,
<-2182919647058111837*3^-1 + O(p^39), -2963606426795524531*3^-2 + O(p^38)>
*]> *];


// ** 709A **: Elliptic Curve defined by y^2 + y = x^3 - x^2 - 2*x over Rational Field

// Q(sqrt(-11))

heights[11] := [* <"709A", -11, [* <false, false>, <false, false>, <false, false>, <false, false> *]> *];


// ** 718B **: Elliptic Curve defined by y^2 + x*y + y = x^3 - 5*x over Rational Field

// Q(sqrt(-71))

heights[12] := [* <"718B", -71, [* <false, false>, <-3499752323227473272*3^-3 + O(p^37), 1187547108495858778*3^-3 + O(p^37)>,
<1462089231022375192*3^-3 + O(p^37), 3000668223899152171*3^-3 + O(p^37)>,
<1030150665179043736*3^-3 + O(p^37), 670642666274802250*3^-3 + O(p^37)>
*]> *];


// ** 794A **: Elliptic Curve defined by y^2 + x*y + y = x^3 - 3*x + 2 over Rational Field

// Q(sqrt(-23))

heights[13] := [* <"794A", -23, [*
<4462182510702605230*3^-2 + O(p^38), -3507347402157431810*3^-2 + O(p^38)>,
<-5329915211526847534*3^-2 + O(p^38), 3598606149419360830*3^-3 + O(p^37)>,
<2495277593850692735*3^-2 + O(p^38), -5260340722418140451*3^-3 + O(p^37)>,
<1465109382275761220*3^-2 + O(p^38), -394586787821713007*3^-3 + O(p^37)>
*]> *];


// ** 817A **: Elliptic Curve defined by y^2 + y = x^3 + x^2 + x + 6 over Rational Field

// Q(sqrt(-8))

heights[14] := [* <"817A", -8, [* <false, false>, <-1354176743485423888*3^-3 + O(p^37), -2053462216707674134*3^-3 + O(p^37)>,
<5938091252285788547*3^-3 + O(p^37), 1372550707058219822*3^-3 + O(p^37)>,
<1891907623753773605*3^-3 + O(p^37), 3060040305083914487*3^-3 + O(p^37)>
*]> *];


// ** 916C **: Elliptic Curve defined by y^2 = x^3 - 4*x + 1 over Rational Field

// Q(sqrt(-11))

heights[15] := [* <"916C", -11, [* <false, false>, <false, 2575759341996527507*3^-2 + O(p^38)>,
<false, false>, <false, false> *]> *];


// ** 944E **: Elliptic Curve defined by y^2 = x^3 - 19*x + 34 over Rational Field

// Q(sqrt(-11))

heights[16] := [* <"944E", -11, [* <false, false>, <false, false>, <-5647105271707110206*3^-5 + O(p^35), false>,
<false, false> *]> *];


// ** 997B **: Elliptic Curve defined by y^2 + y = x^3 - x^2 - 5*x - 3 over Rational Field

// Q(sqrt(-23))

heights[17] := [**];


// ** 997C **: Elliptic Curve defined by y^2 + y = x^3 - x^2 - 24*x + 54 over Rational Field

// Q(sqrt(-23))

heights[18] := [* <"997C", -23, [*
<false, -1892039863366021720*3^-1 + O(p^39)>,
<false, false>, <false, 5661372025716929659*3^-3 + O(p^37)>,
<false, false> *]> *];



procedure Entry(n)
   if #heights[n] eq 0 then
      return;
   end if;
   D := heights[n][1][2];
   E := heights[n][1][1];
   printf "E: %o, K=Q(sqrt(%o))\n", E, D;
   for a in [1,2] do
      for i in [1..4] do
	 val :=  heights[n][1][3][i][a];
	 printf "H_2(3^%o*P_%o)/3^%o := ", i,a,2*i;
	 if Type(val) eq BoolElt then
	    print "undef";
	 else
	    print val + O(p^5);
	 end if;
      end for;
      print "";
   end for;
end procedure;

