
// Make newform 3234.2.e.b in Magma, downloaded from the LMFDB on 20 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_3234_e();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_3234_e_Hecke();"
// To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
// To make the newform (type ModFrm), type "MakeNewformModFrm_3234_2_e_b();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_3234_2_e_b();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose line below.
// The default sign is -1.  You can change this with the optional parameter "sign".
function ConvertToHeckeField(input: pass_field := false, Kf := [])
    if not pass_field then
        poly := [13417, -82874, 223844, -386266, 493030, -477124, 378750, -239606, 130215, -56904, 22086, -6718, 1878, -378, 74, -8, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [32362633, -401151387, 915620088, -1271162965, 1294712939, -946931332, 593880549, -276086391, 118372755, -36618018, 11140707, -2209147, 474100, -48881, 6983, 0], [-13304183911, 86434816533, -230411582664, 371398223899, -415275809861, 336742486204, -222125567883, 110238860505, -48699356733, 15780182142, -4890679917, 1006694677, -218220364, 23279039, -3325577, 0], [-1021023169, 6439036695, -14950384260, 21441640105, -22848161615, 17710001596, -11573124741, 5700932979, -2534621871, 831319938, -260705691, 54968071, -12040024, 1328621, -189803, 0], [-14998863325, 65763256533, -140966904954, 185929817443, -189878074001, 139944185800, -88964564157, 42250495017, -18432565677, 5872472250, -1818246999, 373930069, -81315274, 8766275, -1252325, 0], [128107011, 5412809207, -15305197790, 25544328593, -28630334953, 23296503804, -15429510803, 7709036103, -3429869109, 1124676710, -351447497, 73557267, -16051742, 1750245, -250035, 0], [-181576943117, -43198382379, 4269219214770, -6580080409159, 10030408696559, -7256018389690, 5676299627439, -2297035581639, 1180057442883, -253528285620, 98833917597, -4029956479, 2631204646, 797619205, -16748485, 31288770], [4642794315301, -18719983335993, 37436097284178, -50908209830125, 50481947842229, -38917872020806, 24141818008761, -12143081222517, 5160916096233, -1785395864580, 533477938419, -126371519773, 25712532526, -3848461265, 452583065, -31288770], [-306749906363, -438472848665, 4991902261014, -10389357329569, 14104341127729, -13472523722594, 9805433466473, -5867164985181, 2742004258845, -1130840178408, 354956782059, -103973734141, 21124971426, -4332228469, 463814085, -61841878], [-1247802075679, 3394648790233, -4833384190332, 10307867859415, -12094824539073, 14096862838860, -10318496609323, 7208963912421, -3402670735473, 1593858572646, -499636537173, 164837589985, -32966828504, 7684579947, -792790405, 124647224], [-4344274484769, 18943545384919, -38151775447740, 54130606016001, -56590192827103, 46664778955628, -30953383474645, 16964786108547, -7649444175615, 2942026006626, -916288554507, 250200637143, -51503270872, 9673472797, -1076917955, 124647224], [-518381770, 2140166891, -4172380467, 5979185161, -5993427763, 5028988886, -3211318028, 1812360285, -791678301, 317610396, -96035346, 27795985, -5530551, 1130119, -119685, 15958], [261797265, -1148282565, 2418391182, -3651650205, 3894289773, -3405656298, 2282122421, -1324712505, 599354649, -244879016, 75998175, -22245945, 4517578, -928497, 100065, -13342], [-509068024, 2121539399, -4172380467, 5979185161, -5993427763, 5028988886, -3211318028, 1812360285, -791678301, 317610396, -96035346, 27795985, -5530551, 1130119, -119685, 15958], [-16963072781711, 71422281850849, -142699154525280, 207235157443403, -212376054391829, 179642141127088, -116732328141163, 65936755256061, -29183922744189, 11652271091298, -3562268688861, 1021087579937, -205410283332, 41319402047, -4436099745, 575875964], [-3970555117103, 16733640083382, -33565389721049, 49211364580575, -50569373700088, 43439436758339, -28374154378543, 16337255299198, -7259574921286, 2960788040621, -905854992267, 265930611712, -53296410441, 11041151095, -1172652900, 158954387]];
    Rf_basisdens := [1, 22807968, 3261539424, 148251792, 815384856, 135897476, 158184662064, 158184662064, 158184662064, 158184662064, 158184662064, 18627492, 7787936, 9313746, 158184662064, 26364110344];
    Rf_basisnums := ChangeUniverse([[z : z in elt] : elt in Rf_num], Kf);
    Rfbasis := [Rf_basisnums[i]/Rf_basisdens[i] : i in [1..Degree(Kf)]];
    inp_vec := Vector(Rfbasis)*ChangeRing(Transpose(Matrix([[elt : elt in row] : row in input])),Kf);
    return Eltseq(inp_vec);
end function;


// To make the character of type GrpDrchElt, type "MakeCharacter_3234_e();"
function MakeCharacter_3234_e()
    N := 3234;
    order := 2;
    char_gens := [1079, 199, 2059];
    v := [2, 1, 1];
    // chi(gens[i]) = zeta^v[i]
    assert UnitGenerators(DirichletGroup(N)) eq char_gens;
    F := CyclotomicField(order);
    chi := DirichletCharacterFromValuesOnUnitGenerators(DirichletGroup(N,F),[F|F.1^e:e in v]);
    return MinimalBaseRingCharacter(chi);
end function;

// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_3234_e_Hecke();"
function MakeCharacter_3234_e_Hecke(Kf)
    N := 3234;
    order := 2;
    char_gens := [1079, 199, 2059];
    char_values := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
    assert UnitGenerators(DirichletGroup(N)) eq char_gens;
    values := ConvertToHeckeField(char_values : pass_field := true, Kf := Kf); // the value of chi on the gens as elements in the Hecke field
    F := Universe(values);// the Hecke field
    chi := DirichletCharacterFromValuesOnUnitGenerators(DirichletGroup(N,F),values);
    return chi;
end function;


function ExtendMultiplicatively(weight, aps, character)
    prec := NextPrime(NthPrime(#aps)) - 1; // we will able to figure out a_0 ... a_prec
    primes := PrimesUpTo(prec);
    prime_powers := primes;
    assert #primes eq #aps;
    log_prec := Floor(Log(prec)/Log(2)); // prec < 2^(log_prec+1)
    F := Universe(aps);
    FXY<X, Y> := PolynomialRing(F, 2);
    // 1/(1 - a_p T + p^(weight - 1) * char(p) T^2) = 1 + a_p T + a_{p^2} T^2 + ...
    R<T> := PowerSeriesRing(FXY : Precision := log_prec + 1);
    recursion := Coefficients(1/(1 - X*T + Y*T^2));
    coeffs := [F!0: i in [1..(prec+1)]];
    coeffs[1] := 1; //a_1
    for i := 1 to #primes do
        p := primes[i];
        coeffs[p] := aps[i];
        b := p^(weight - 1) * F!character(p);
        r := 2;
        p_power := p * p;
        //deals with powers of p
        while p_power le prec do
            Append(~prime_powers, p_power);
            coeffs[p_power] := Evaluate(recursion[r + 1], [aps[i], b]);
            p_power *:= p;
            r +:= 1;
        end while;    
    end for;
    Sort(~prime_powers);
    for pp in prime_powers do
        for k := 1 to Floor(prec/pp) do
            if GCD(k, pp) eq 1 then
                coeffs[pp*k] := coeffs[pp]*coeffs[k];
            end if;
        end for;
    end for;
    return coeffs;
end function;


function qexpCoeffs()
    // To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
    weight := 2;
    raw_aps := [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 2, 0, 1, 1, 0, 1, -1, 0, 0, 0, 1, 0], [0, 1, 1, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, -1, -1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, 0, 0, 1, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0], [0, 1, -2, -1, 0, 1, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 1, 0, 2, 1, 0, -2, 1, 2, 1, 0], [0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0], [-3, 2, 0, 0, 1, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0], [-2, -1, 1, -1, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 2, 0, 1, 1, 0, 1, -1, 2, -2, -2, 1, -1], [0, 0, 0, 0, 2, 0, -1, 3, -3, 0, -2, 0, -3, -1, 0, -2], [0, 1, -1, -3, -1, 2, -1, -1, 0, -1, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 3, 0, 1, 2, 0, 3, 0, -2, 3, 2, 3, 0], [4, -1, -1, 2, -1, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0], [2, -2, -2, -2, -1, 2, -1, -1, 0, -1, 1, 0, 0, 0, 0, 0], [-4, -1, 0, 2, 0, 1, 1, 1, 0, 1, -1, 0, 0, 0, 0, 0], [-4, 2, -2, 0, -4, 0, -2, -2, 0, -2, 2, 0, 0, 0, 0, 0], [0, 0, 0, 0, -1, 0, -2, 1, -1, 0, 1, 0, 0, 1, 1, 2], [0, -1, -3, -1, -1, 1, -1, -1, 0, -1, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 2, 0, 2, 0, -2, 2, 0, 0, 0, 0, 2, 0], [0, 0, 0, 0, -1, 0, -1, 0, -4, 0, 1, 2, -4, 4, -2, -1], [4, 0, -3, 1, -5, -1, -3, -3, 0, -1, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 4, 0, 0, 4, -2, 2, -2, 4, 2, 0, 2, -2], [0, 0, 0, 0, -4, 0, -1, -3, 2, -2, 2, 0, -2, 1, -3, 1], [0, 0, 0, 0, 2, 0, 1, 1, 0, 3, 1, 1, -6, 1, 2, 0], [2, 0, 0, -4, -4, 2, -2, -2, 0, -4, 4, 0, 0, 0, 0, 0], [0, 0, 0, 0, 4, 0, 1, 3, 0, 2, -2, -1, -4, 3, 3, -1], [2, 2, 2, 0, -4, 0, -1, -1, 0, -3, 3, 0, 0, 0, 0, 0], [-2, 4, 4, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 0, -4, -2, -1, 2, -2, -2, 0, 1, -1, 0, 0, 0, 0, 0], [0, 0, 0, 0, -1, 0, 0, -1, 4, -2, -1, 0, 1, -4, 1, 2], [0, 0, 0, 0, 4, 0, 3, 1, 0, 2, -2, -1, 0, 3, 3, -1], [0, 0, 0, 0, 0, 0, -1, 1, -2, 3, 3, -2, -4, 2, 1, 1], [6, 1, -5, 1, -5, 1, -4, -4, 0, -2, 2, 0, 0, 0, 0, 0], [-6, 8, 0, 0, -2, 2, -2, -2, 0, -4, 4, 0, 0, 0, 0, 0], [-4, 0, 0, 2, -2, -2, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0], [2, -4, 1, -1, 1, -1, 1, 1, 0, 3, -3, 0, 0, 0, 0, 0], [0, 0, 0, 0, 6, 0, 2, 4, -2, 4, -2, 0, -4, 2, 2, -4], [-4, 3, 3, 5, 9, 0, 6, 6, 0, 6, -6, 0, 0, 0, 0, 0], [0, 0, 0, 0, 4, 0, 1, 3, 2, 2, -2, -2, 2, -6, 2, -2], [0, 0, 0, 0, -1, 0, -2, 1, 2, 0, 1, 4, -1, -4, -1, 0], [0, 0, 0, 0, 6, 0, 4, 2, 2, 4, -2, -2, 2, 0, 6, 0], [0, 0, 0, 0, 4, 0, 2, 2, 0, 4, 0, 2, 0, -4, 4, 0], [0, 0, 0, 0, 4, 0, 1, 3, 4, 2, -2, 0, -10, -4, 4, 0], [-6, 0, 4, 4, 5, -4, 4, 4, 0, 4, -4, 0, 0, 0, 0, 0], [0, 0, 0, 0, -2, 0, 0, -2, 4, -2, 0, -2, 4, -4, 0, 2], [0, 0, 0, 0, 2, 0, 3, -1, 2, 1, -1, 2, 5, 6, 0, -2], [0, 0, 0, 0, 0, 0, 0, 0, -4, 2, 2, 2, -8, 6, -2, -2], [4, -8, -4, -4, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 1, 0, 0, 3, 2, -4, -1, 0, 1, 0], [0, 0, 0, 0, 4, 0, 2, 2, 0, 0, -4, -2, 8, 4, 0, -4], [0, 0, 0, 0, 6, 0, -2, 8, 0, 0, -6, 2, 0, -6, 2, -4], [0, 0, 0, 0, 3, 0, 2, 1, -1, -1, -4, 2, 4, -5, 1, -2], [4, 3, -3, -1, 1, 2, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 3, 0, 0, 3, -3, 1, -2, 3, 8, 2, 3, 0], [0, 0, 0, 0, -3, 0, -2, -1, 0, 3, 6, -6, 1, 7, 0, 3], [-8, 0, -4, 2, -6, 4, -2, -2, 0, -4, 4, 0, 0, 0, 0, 0], [8, 0, -1, 3, 3, -1, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0], [-4, 2, 6, -2, -2, 2, 0, 0, 0, -2, 2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, -1, -3, 0, 0, 0, -9, 3, -2, -2], [0, 0, 0, 0, -2, 0, 0, -2, 2, 1, 3, -4, -2, 6, 1, 3], [2, 0, 2, -1, 0, 0, 2, 2, 0, -3, 3, 0, 0, 0, 0, 0], [2, 7, 1, 3, 1, -1, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0], [0, 0, 0, 0, -6, 0, -1, -5, 0, -2, 4, -4, 10, 8, -2, 4], [0, 0, 0, 0, 3, 0, 5, -2, -2, 3, 0, -2, -2, -6, 1, -2], [-4, 0, -2, -5, -4, 2, -5, -5, 0, -6, 6, 0, 0, 0, 0, 0], [0, 0, 0, 0, -2, 0, -2, 0, -4, -2, 0, -2, -4, 2, -4, -2], [0, 0, 0, 0, 0, 0, 2, -2, 6, 0, 0, -4, 0, -2, 0, 0], [0, 0, 0, 0, -4, 0, -3, -1, 4, -2, 2, 2, 4, 2, -4, 0], [0, 0, 0, 0, 5, 0, 3, 2, -1, 6, 1, -6, -4, -1, 5, 0], [-10, -1, -5, -3, -5, 5, -2, -2, 0, -6, 6, 0, 0, 0, 0, 0], [0, 0, 0, 0, 8, 0, 4, 4, 1, 3, -5, -1, 3, -2, 6, -2], [10, 0, -2, -1, 4, 2, 3, 3, 0, 2, -2, 0, 0, 0, 0, 0], [0, 0, 0, 0, -8, 0, -3, -5, 4, -7, 1, 2, 0, -10, -7, 1], [2, -8, 0, -2, 2, -2, 2, 2, 0, 2, -2, 0, 0, 0, 0, 0], [0, 10, 0, -2, 2, 2, -3, -3, 0, -4, 4, 0, 0, 0, 0, 0], [0, 0, 0, 0, -1, 0, 2, -3, 0, 0, 1, -4, 11, 8, -1, 0], [-1, -8, -6, -8, 5, 2, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0], [0, 0, 0, 0, -8, 0, 2, -10, 2, -2, 6, -2, 12, 6, -6, 2], [0, 0, 0, 0, 0, 0, 5, -5, -2, -2, -2, 0, 8, -5, -2, -2], [7, 2, 2, -3, -1, 2, 0, 0, 0, -5, 5, 0, 0, 0, 0, 0], [6, -10, 3, -3, 9, -1, 4, 4, 0, 4, -4, 0, 0, 0, 0, 0], [0, 0, 0, -2, 6, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -4, 0, -5, 1, -4, -2, 2, 2, -2, -10, -4, 0], [-8, 0, 3, 7, -1, -1, 1, 1, 0, 3, -3, 0, 0, 0, 0, 0], [0, -2, 2, -2, -2, -6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 3, 0, 2, 1, 2, 0, -3, 0, 7, 0, 1, -2], [12, 0, 4, 0, 2, -4, 4, 4, 0, 2, -2, 0, 0, 0, 0, 0], [4, 4, -2, 4, -6, -2, -1, -1, 0, -4, 4, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, -1, 6, -2, -2, -4, -2, 3, 1, 1], [-8, 6, 4, 0, -8, 0, -4, -4, 0, -10, 10, 0, 0, 0, 0, 0], [-8, -2, 2, 0, 4, 2, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -1, 0, 1, -2, -7, 0, 1, 3, -8, -2, -5, -4], [0, 0, 0, 0, -4, 0, -2, -2, -4, -4, 0, 0, 12, -4, -4, 0], [20, 0, -4, -2, -2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -8, 0, 1, -9, 0, -7, 1, 5, -8, 5, -8, 0], [0, 0, 0, 0, 0, 0, 3, -3, 2, 1, 1, -4, 14, -4, 5, 5], [0, 0, 0, 0, -7, 0, -5, -2, 4, -5, 2, -6, 13, -2, -1, 6], [2, 0, 0, -6, 2, 2, 5, 5, 0, 3, -3, 0, 0, 0, 0, 0], [0, 0, 0, 0, 3, 0, -2, 5, 6, 0, -3, 0, -1, -2, 3, 0], [0, 0, 0, 0, -8, 0, -3, -5, -4, -9, -1, 4, -6, -14, -7, 1], [0, 0, 0, 0, -7, 0, -2, -5, 0, -1, 6, 2, -6, 2, -7, 0], [0, 0, 0, 0, 2, 0, 1, 1, 0, 5, 3, 2, 0, -2, -2, -4], [14, 6, 3, -1, -3, 1, -1, -1, 0, -3, 3, 0, 0, 0, 0, 0], [-4, 5, 3, -2, 3, -2, 5, 5, 0, 2, -2, 0, 0, 0, 0, 0], [-4, 8, 6, 2, 10, 0, 5, 5, 0, 6, -6, 0, 0, 0, 0, 0], [-20, -11, 5, 4, 5, -4, 2, 2, 0, 4, -4, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 1, 0, 9, 0, -1, -2, 6, 1, 5, 4], [-2, 8, 0, 6, -2, 2, 0, 0, 0, -2, 2, 0, 0, 0, 0, 0], [0, 0, 0, 0, -2, 0, 4, -6, 6, 1, 3, 2, -6, 1, -3, -1], [16, 10, 4, 10, 4, -2, 5, 5, 0, 8, -8, 0, 0, 0, 0, 0], [-18, 8, 0, -4, 6, 0, 2, 2, 0, -2, 2, 0, 0, 0, 0, 0], [0, 0, 0, 0, -2, 0, 2, -4, 4, -2, 0, 0, -6, -2, 0, 2], [0, 0, 0, 0, -6, 0, -1, -5, 6, -5, 1, -3, 4, -13, -6, 0], [6, 0, -10, 1, -16, 4, -8, -8, 0, -7, 7, 0, 0, 0, 0, 0], [0, 0, 0, 0, 2, 0, 6, -4, 10, 1, -1, -4, 14, 5, 5, 3], [0, 0, 0, 0, -2, 0, -1, -1, -6, 5, 7, -4, -12, 6, -1, 1], [0, 0, 0, 0, -4, 0, -7, 3, -6, -2, 2, -4, -14, -2, -4, 0], [28, 0, 1, 3, -1, -5, -2, -2, 0, 2, -2, 0, 0, 0, 0, 0], [-14, -10, 3, -3, 1, -3, 2, 2, 0, 2, -2, 0, 0, 0, 0, 0], [0, 0, 0, 0, -6, 0, -2, -4, 6, -5, 1, -2, -2, 5, -7, -1], [0, 0, 0, 0, -3, 0, 1, -4, -2, 3, 6, 0, -15, 2, -1, 2], [-5, -6, 0, -8, 7, 4, 2, 2, 0, -1, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, -1, 0, -1, 0, 0, -3, -2, 1, -7, -7, 1, 2], [0, 0, 0, 0, -2, 0, -5, 3, -6, 0, 2, 10, -4, -6, -4, -2], [0, 8, -2, -5, 4, -2, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 6, 0, 4, 2, 2, 0, -6, -6, 4, 8, 4, -2], [0, 0, 0, 0, 2, 0, 4, -2, -4, -2, -4, 2, 0, 4, -2, -4], [0, -10, -8, -8, -4, 0, -5, -5, 0, -4, 4, 0, 0, 0, 0, 0], [-5, -8, -2, -4, 3, -4, -2, -2, 0, -1, 1, 0, 0, 0, 0, 0], [-18, 2, 2, -2, 3, 2, -3, -3, 0, 1, -1, 0, 0, 0, 0, 0], [8, 6, -8, 2, -8, 0, -5, -5, 0, -2, 2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, -1, 2, -1, 0, -1, -2, 0, 13, 1, 0], [1, 12, -8, -8, -5, 12, -2, -2, 0, -9, 9, 0, 0, 0, 0, 0], [0, 0, 0, 0, -9, 0, -2, -7, 3, -5, 4, -2, -20, 7, -5, 4], [0, 0, 0, 0, -11, 0, -3, -8, 0, -3, 8, 2, 4, -8, -9, 2], [0, 4, 4, 4, -2, -2, 4, 4, 0, 2, -2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -5, 5, -10, -1, -1, 4, -14, 2, -4, -4], [-4, -6, -8, -4, 0, 6, -2, -2, 0, -2, 2, 0, 0, 0, 0, 0], [0, 0, 0, 0, -3, 0, 0, -3, -2, -4, -1, -6, 2, -4, -3, 0], [0, 0, 0, 0, 6, 0, -3, 9, -6, -1, -7, 8, 4, -4, 1, -5], [0, 0, 0, 0, 10, 0, 1, 9, 2, 5, -5, -3, -8, 3, 6, -4], [0, -1, -7, 4, -7, 6, -3, -3, 0, -8, 8, 0, 0, 0, 0, 0], [4, -3, 2, 4, 6, -2, 1, 1, 0, -1, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, -3, 0, 3, -6, 4, 3, 6, -10, -4, 4, -1, 2], [-4, 6, -2, -3, -4, 8, -1, -1, 0, -6, 6, 0, 0, 0, 0, 0], [0, 0, 0, 0, 5, 0, 1, 4, -3, 6, 1, -6, -6, 13, 1, -4], [0, 0, 0, 0, -6, 0, 0, -6, 8, -6, 0, 0, 28, -10, -4, 2], [14, -14, 4, 8, 3, -4, 5, 5, 0, 3, -3, 0, 0, 0, 0, 0], [0, -2, 10, 0, 4, 4, 4, 4, 0, 4, -4, 0, 0, 0, 0, 0], [-10, -2, -6, 2, -1, -6, -3, -3, 0, 5, -5, 0, 0, 0, 0, 0], [0, -4, 5, 2, -7, 1, -2, -2, 0, -1, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 4, 0, 2, 2, 2, 4, 0, -5, 0, -13, 7, 3], [0, 0, 0, 0, -2, 0, 0, -2, -8, -4, -2, 10, -12, 0, -6, -4], [-4, -10, 0, 0, 8, 0, 5, 5, 0, 10, -10, 0, 0, 0, 0, 0], [4, -4, 11, 1, 11, -3, 2, 2, 0, 10, -10, 0, 0, 0, 0, 0], [-10, 0, 3, -9, 7, -1, 1, 1, 0, 1, -1, 0, 0, 0, 0, 0], [0, 0, 0, 0, -1, 0, 1, -2, 0, -5, -4, 2, 0, -8, 1, 2], [0, 0, 0, 0, 7, 0, 1, 6, -17, 3, -4, -4, -12, 11, 2, -5], [0, 0, 0, 0, -6, 0, 5, -11, 14, -1, 5, -10, 8, -8, 2, 8], [8, -8, -4, 0, 4, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 5, -4, 8, -5, -6, 1, 23, -11, 3, 2], [0, -2, -6, -4, 0, 4, 5, 5, 0, -4, 4, 0, 0, 0, 0, 0], [4, -1, 3, -1, 5, 0, -2, -2, 0, 6, -6, 0, 0, 0, 0, 0], [0, 0, 0, 0, -4, 0, -7, 3, -2, -6, -2, 2, 8, -8, -4, 0], [0, 0, 0, 0, 11, 0, 1, 10, 1, 4, -7, 3, 4, 6, 9, -2], [0, 0, 0, 0, 1, 0, -6, 7, -10, -2, -3, 6, -10, -8, -1, -2], [0, 0, 0, 0, -2, 0, -4, 2, 0, 2, 4, -4, -20, 14, 0, 2], [0, 0, 0, 0, -6, 0, -2, -4, 4, -4, 2, -4, 4, 0, 2, 8], [0, 0, 0, 0, 4, 0, -3, 7, -8, 10, 6, -4, -10, 6, 2, -2], [0, 0, 0, 0, -2, 0, -1, -1, 2, 6, 8, -4, 0, 8, -4, -2], [0, 0, 0, 0, -2, 0, -4, 2, -8, 0, 2, 2, 4, -6, -2, 0], [0, 0, 0, 0, 2, 0, -5, 7, -2, -3, -5, 2, -14, 0, 3, 1], [8, -1, -11, -5, -7, 2, -5, -5, 0, -5, 5, 0, 0, 0, 0, 0], [4, 10, 4, 13, 0, -10, 3, 3, 0, 4, -4, 0, 0, 0, 0, 0], [-12, -5, -5, 7, -3, 0, -2, -2, 0, 0, 0, 0, 0, 0, 0, 0], [-12, 6, -4, 0, 6, 2, 1, 1, 0, 2, -2, 0, 0, 0, 0, 0], [10, 5, 3, -7, 3, 3, 3, 3, 0, 1, -1, 0, 0, 0, 0, 0], [-11, 12, 6, 8, 11, 4, 8, 8, 0, 5, -5, 0, 0, 0, 0, 0], [-8, -7, 2, -12, 2, 6, 1, 1, 0, 1, -1, 0, 0, 0, 0, 0], [0, 3, 0, 10, -4, 1, -3, -3, 0, 3, -3, 0, 0, 0, 0, 0], [0, 0, 0, 0, -7, 0, -5, -2, -1, -4, 3, 5, -16, -10, -3, 4], [0, 0, 0, 0, 4, 0, 5, -1, 4, -3, -7, 5, -12, -15, 0, -4], [0, 0, 0, 0, 12, 0, 8, 4, 2, 7, -5, 6, -8, 5, 3, -9], [0, 0, 0, 0, -10, 0, -3, -7, -4, -8, 2, 10, 12, 0, -8, 2], [0, 0, -12, -6, 0, 4, 2, 2, 0, -2, 2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 4, 0, 4, 0, -2, -1, -5, 4, -14, -6, 3, -1], [0, 0, 0, 0, 1, 0, 0, 1, -14, 0, -1, 2, -6, -4, -5, -6], [-10, 1, 9, 11, 5, -9, 6, 6, 0, 4, -4, 0, 0, 0, 0, 0], [0, 0, 0, 0, -3, 0, 0, -3, 13, 3, 6, -9, 12, 4, -1, 2], [0, 0, 0, 0, 2, 0, 5, -3, 4, -3, -5, -8, 8, -4, -4, -6], [0, 0, 0, 0, 6, 0, -2, 8, -2, 8, 2, -10, -4, -4, 10, 4], [0, 0, 0, 0, -12, 0, -6, -6, 2, -8, 4, 6, -8, 8, -4, 8], [11, -2, 8, 8, -5, -8, -2, -2, 0, 5, -5, 0, 0, 0, 0, 0], [-8, 8, 4, -4, -8, 8, -2, -2, 0, -12, 12, 0, 0, 0, 0, 0], [-26, 4, -8, -10, 6, 0, 0, 0, 0, -2, 2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 6, 0, -1, 7, -10, 7, 1, -6, -6, 16, 2, -4], [23, -1, -1, -1, 8, -2, 2, 2, 0, 3, -3, 0, 0, 0, 0, 0], [0, 0, 0, 0, -2, 0, -4, 2, -12, -4, -2, 4, -12, 2, -8, -6], [12, 4, -6, 6, -12, -4, -6, -6, 0, -4, 4, 0, 0, 0, 0, 0], [0, 0, 0, 0, 3, 0, 4, -1, 8, -2, -5, -6, 7, 2, 7, 4], [0, 0, 0, 0, 1, 0, 1, 0, -5, 2, 1, 13, -20, 2, 1, 0], [0, 0, 0, 0, -6, 0, -8, 2, 4, -6, 0, -6, -2, 6, -6, 0], [0, 0, 0, 0, 9, 0, 4, 5, -10, 4, -5, -2, -14, 4, 3, -6], [0, 0, 0, 0, 4, 0, 6, -2, 6, 7, 3, -6, 0, 3, 5, 1], [0, 0, 0, 0, 6, 0, 2, 4, 8, 2, -4, 0, 22, 2, 8, 2], [0, 0, 0, 0, -6, 0, 0, -6, 4, -10, -4, 0, -2, -14, -8, -2], [0, 0, 0, 0, -1, 0, 8, -9, 3, 5, 6, 2, -4, 15, -1, 0], [0, 0, 18, 14, 4, -12, 3, 3, 0, 6, -6, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 7, -7, 6, 1, 1, 0, 8, 18, 0, 0], [0, 12, -12, -2, -12, 8, -6, -6, 0, -10, 10, 0, 0, 0, 0, 0], [0, 0, 0, 0, -8, 0, 1, -9, 4, -9, -1, 8, 14, -6, -5, 3], [0, 0, 0, 0, 7, 0, -1, 8, -15, 7, 0, -1, 8, -2, 5, -2], [-14, 14, -2, -6, 5, 2, 3, 3, 0, -5, 5, 0, 0, 0, 0, 0], [-4, 2, 6, 9, -8, 4, -1, -1, 0, -2, 2, 0, 0, 0, 0, 0], [14, -5, -3, 9, -13, -8, -8, -8, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -7, 0, -4, -3, -7, -7, 0, 3, 2, -22, -7, 0], [-9, 3, -3, 8, 18, 4, 7, 7, 0, 3, -3, 0, 0, 0, 0, 0], [-12, -6, -10, 4, -4, -6, -6, -6, 0, 2, -2, 0, 0, 0, 0, 0], [4, -16, -14, -14, -8, 2, -3, -3, 0, -6, 6, 0, 0, 0, 0, 0], [-16, 8, 0, 12, 3, 0, 8, 8, 0, 6, -6, 0, 0, 0, 0, 0], [0, 0, 0, 0, -3, 0, -1, -2, 11, 6, 9, -14, 0, 19, 1, 4], [0, 0, 0, 0, 4, 0, -4, 8, -2, 8, 4, -4, -8, -12, 8, 4], [20, -8, -3, -6, -3, 5, -4, -4, 0, 3, -3, 0, 0, 0, 0, 0], [23, -10, 2, 1, -9, 2, -2, -2, 0, -5, 5, 0, 0, 0, 0, 0], [0, 0, 0, 0, -8, 0, -10, 2, -16, -8, 0, 0, 0, -10, -8, 0], [-3, -10, -4, 2, -3, 8, -4, -4, 0, -1, 1, 0, 0, 0, 0, 0], [25, -20, 0, 0, 1, -6, 2, 2, 0, 7, -7, 0, 0, 0, 0, 0], [0, 0, 0, 0, 13, 0, 4, 9, 11, 4, -9, 1, 20, 0, 4, -9], [0, 0, 0, 0, -1, 0, 6, -7, 12, 3, 4, -6, -17, -9, -2, -1], [0, 0, 0, 0, 1, 0, 5, -4, 16, 3, 2, -14, 2, 4, 3, 2], [-26, 2, -6, 6, -2, -4, 2, 2, 0, 2, -2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 2, 0, 4, -2, 6, -5, -7, 0, 26, -10, 3, 1], [0, 0, 0, 0, 6, 0, 5, 1, 4, 1, -5, 0, -2, 6, 4, -2], [-4, 2, 4, -6, 12, 6, 6, 6, 0, 4, -4, 0, 0, 0, 0, 0], [0, 0, 0, 0, 3, 0, -1, 4, -7, -2, -5, -4, 0, -9, -1, -4], [2, 10, 1, 1, -17, 7, -5, -5, 0, -9, 9, 0, 0, 0, 0, 0], [-16, -20, 4, -4, 8, -6, 4, 4, 0, 8, -8, 0, 0, 0, 0, 0], [0, 0, 0, 0, 14, 0, 7, 7, 4, 12, -2, -4, -24, 6, 12, -2], [-7, 0, -2, -6, 3, -2, 6, 6, 0, 5, -5, 0, 0, 0, 0, 0], [-10, -10, -17, -9, -3, 1, -1, -1, 0, 1, -1, 0, 0, 0, 0, 0], [-10, 2, -6, 2, -16, -4, -8, -8, 0, -6, 6, 0, 0, 0, 0, 0], [0, 0, 0, 0, 6, 0, 1, 5, 4, 0, -6, 10, 8, -2, 6, 0], [0, 0, 0, 0, 7, 0, 2, 5, 0, 10, 3, 2, -11, -8, 9, 2], [0, 0, 0, 0, 20, 0, 1, 19, -8, 9, -11, 6, -2, -6, 11, -9], [0, 0, 0, 0, 10, 0, 4, 6, -4, 6, -4, -12, 8, 18, 6, -4], [0, 0, 0, 0, 15, 0, 2, 13, 3, 3, -12, -3, -10, -2, 7, -8], [14, 14, -1, -5, 3, 5, 3, 3, 0, -3, 3, 0, 0, 0, 0, 0], [-12, -17, 6, 5, 4, -5, -2, -2, 0, 5, -5, 0, 0, 0, 0, 0], [0, 0, 0, 0, -13, 0, -7, -6, -10, -5, 8, 2, -6, 2, -7, 6], [20, 2, -14, 4, -8, 2, -7, -7, 0, -5, 5, 0, 0, 0, 0, 0], [0, 0, 0, 0, -6, 0, -7, 1, -8, -9, -3, 8, -8, 6, -10, -4], [-2, 16, -12, -6, -4, 8, -2, -2, 0, -10, 10, 0, 0, 0, 0, 0], [7, 4, -4, 6, -5, 6, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 7, 0, 11, -4, -7, 6, -1, -1, 8, -6, 5, -2], [8, 16, 0, 14, -2, -8, 1, 1, 0, 2, -2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 16, 0, 3, 13, 6, 11, -5, -3, -20, 11, 10, -6], [0, 0, 0, 0, 6, 0, 1, 5, -4, -1, -7, 16, 8, 2, 0, -6], [-16, -4, -14, -7, -8, 2, -7, -7, 0, -10, 10, 0, 0, 0, 0, 0], [20, -11, 1, -2, 9, -4, 7, 7, 0, 14, -14, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 4, -4, 10, 0, 0, -4, 4, 2, 2, 2], [0, 0, 0, 0, 8, 0, 6, 2, 8, 2, -6, 8, 4, -6, 2, -6], [12, -1, -1, -2, -17, 8, -6, -6, 0, -13, 13, 0, 0, 0, 0, 0], [0, 0, 0, 0, 6, 0, 4, 2, -6, 6, 0, -2, 0, 10, 0, -6], [0, 0, 0, 0, -2, 0, 3, -5, 2, -3, -1, 4, 26, -18, -5, -3], [0, 0, 0, 0, 0, 0, 3, -3, -4, 5, 5, 10, -14, -10, 0, 0], [0, 0, 0, 0, 0, 0, 5, -5, -4, 1, 1, -8, 4, 20, -1, -1], [14, -10, 0, -4, 3, -8, 3, 3, 0, 3, -3, 0, 0, 0, 0, 0], [0, 0, 0, 0, -10, 0, 3, -13, 2, -8, 2, 8, 16, -12, -8, 2], [0, 0, 0, 0, -9, 0, -3, -6, -5, 3, 12, 0, -28, -5, -6, 3], [0, -12, -2, -24, 4, 6, 1, 1, 0, -8, 8, 0, 0, 0, 0, 0], [0, 0, 0, 0, 2, 0, 2, 0, -8, -2, -4, 14, -20, -8, 0, -2], [10, -6, 1, -3, 13, -3, 6, 6, 0, 12, -12, 0, 0, 0, 0, 0], [0, 0, 0, 0, -1, 0, -1, 0, -1, -4, -3, 2, -2, -9, -5, -4], [0, 0, 0, 0, -6, 0, -2, -4, 4, -2, 4, -6, 18, 10, -2, 4], [-14, 4, 4, 2, 19, 6, 11, 11, 0, 3, -3, 0, 0, 0, 0, 0], [10, 14, 10, -4, 2, -4, -2, -2, 0, 0, 0, 0, 0, 0, 0, 0], [-8, 10, 10, 12, 8, -2, 1, 1, 0, 4, -4, 0, 0, 0, 0, 0], [22, -2, -10, -12, -6, 2, -4, -4, 0, -10, 10, 0, 0, 0, 0, 0], [-4, -8, 0, -5, -14, 4, -7, -7, 0, -4, 4, 0, 0, 0, 0, 0], [1, 10, 14, -6, 19, 0, 16, 16, 0, 7, -7, 0, 0, 0, 0, 0], [-20, 12, 5, 6, 17, 1, 4, 4, 0, 9, -9, 0, 0, 0, 0, 0], [6, -10, -6, -14, 4, 6, 3, 3, 0, 2, -2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 13, 0, -1, 14, -6, 13, 0, -4, -13, 2, 11, -2], [0, 0, 0, 0, -8, 0, 1, -9, 2, -4, 4, -2, -28, 4, 0, 8], [-6, -14, 5, 5, 7, -5, 9, 9, 0, 13, -13, 0, 0, 0, 0, 0], [14, 0, -6, -13, 4, 2, -1, -1, 0, -2, 2, 0, 0, 0, 0, 0], [0, 0, 0, 0, -3, 0, 3, -6, 8, -3, 0, 8, 5, -12, -3, 0], [0, 0, 0, 0, 16, 0, 2, 14, -2, 9, -7, -10, 0, -5, 5, -11], [2, 4, -4, 10, 1, -6, 1, 1, 0, 1, -1, 0, 0, 0, 0, 0], [0, 0, 0, 0, -6, 0, 5, -11, -8, -5, 1, 7, 22, -13, -6, 0], [-16, -10, -10, -16, -14, 14, -5, -5, 0, -15, 15, 0, 0, 0, 0, 0], [0, 0, 0, 0, 8, 0, -2, 10, -12, 2, -6, -8, -20, -2, -2, -10], [0, 0, 0, 0, 1, 0, 1, 0, 7, -2, -3, 2, 24, -11, -1, -2], [18, 5, -5, -1, 11, -7, 4, 4, 0, 2, -2, 0, 0, 0, 0, 0], [1, 18, 6, 8, -1, 2, 6, 6, 0, 1, -1, 0, 0, 0, 0, 0], [-8, -12, -18, 0, -16, 4, -4, -4, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -1, 0, -9, 8, -14, -7, -6, 6, -15, -24, -3, -2], [0, 0, 0, 0, 3, 0, 2, 1, 9, 2, -1, 3, 16, -4, 2, -1]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_3234_e_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_3234_2_e_b();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
function MakeNewformModFrm_3234_2_e_b(:prec:=16)
    chi := MakeCharacter_3234_e();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 2));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(1999) - 1;
    while true do
        trunc_vec := Vector(Kf, [0] cat [f_vec[i]: i in [1..prec]]);
        B := Basis(S, prec + 1);
        S_basismat := Matrix([AbsEltseq(g): g in B]);
        if Rank(S_basismat) eq Min(NumberOfRows(S_basismat), NumberOfColumns(S_basismat)) then
            S_basismat := ChangeRing(S_basismat,Kf);
            f_lincom := Solution(S_basismat,trunc_vec);
            f := &+[f_lincom[i]*Basis(S)[i] : i in [1..#Basis(S)]];
            return f;
        end if;
        error if prec eq maxprec, "Unable to distinguish newform within newspace";
        prec := Min(Ceiling(1.25 * prec), maxprec);
    end while;
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_3234_2_e_b();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose line below.
// The default sign is -1.  You can change this with the optional parameter "sign".
function MakeNewformModSym_3234_2_e_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_3234_e();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![35344, 0, 158136, 0, 240841, 0, 156530, 0, 52131, 0, 9580, 0, 971, 0, 50, 0, 1]>,<13,R![-128, 1216, -592, -1168, 836, 8, -64, 0, 1]>],Snew);
    return Vf;
end function;