
// Make newform 1900.3.e.g in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1900_e();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_1900_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_1900_3_e_g();".
// 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_1900_3_e_g();".
// 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 := [151875, 0, 1994425, 0, 1440495, 0, 390297, 0, 49092, 0, 3026, 0, 89, 0, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [13, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88760925, 0, 507707525, 0, 168176486, 0, 17246726, 0, 631973, 0, 4422, 0, -107, 0], [843924750, 0, 451211695, 0, 49911024, 0, 407849, 0, -499913, 0, -34907, 0, -648, 0], [-2922880500, -17209386875, 10133859150, -5407506030, 6162209865, -382439106, 1050305265, 14407194, 72077670, 2732597, 2161755, 110483, 23670, 1462], [-2922880500, 17209386875, 10133859150, 5407506030, 6162209865, 382439106, 1050305265, -14407194, 72077670, -2732597, 2161755, -110483, 23670, -1462], [-743885250, 0, -6362924960, 0, -3026541407, 0, -496542482, 0, -35328191, 0, -1135449, 0, -13561, 0], [0, 40788043750, 0, 16213033785, 0, 619030032, 0, -259998543, 0, -29091859, 0, -1102351, 0, -14264], [146643050, 0, 805742830, 0, 343822347, 0, 52791402, 0, 3662221, 0, 117049, 0, 1401, 0], [0, -42678853750, 0, -35301808665, 0, -9698654253, 0, -1229628903, 0, -76892714, 0, -2303996, 0, -26419], [0, -49836614500, 0, -35642654415, 0, -9698654253, 0, -1229628903, 0, -76892714, 0, -2303996, 0, -26419], [0, -1252190975, 0, 2159753685, 0, 1219089951, 0, 206445486, 0, 14768858, 0, 473087, 0, 5608], [0, 15865169450, 0, 12974409555, 0, 3816325902, 0, 498348567, 0, 30950281, 0, 902959, 0, 9986]];
    Rf_basisdens := [1, 1, 1, 22723050, 37871750, 340845750, 340845750, 113615250, 340845750, 7574350, 340845750, 340845750, 68169150, 68169150];
    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_1900_e();"
function MakeCharacter_1900_e()
    N := 1900;
    order := 2;
    char_gens := [951, 77, 401];
    v := [2, 2, 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_1900_e_Hecke();"
function MakeCharacter_1900_e_Hecke(Kf)
    N := 1900;
    order := 2;
    char_gens := [951, 77, 401];
    char_values := [[1, 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], [-1, 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 := 3;
    raw_aps := [[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, 0, 0, 0, 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, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0], [0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [2, 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, 1, 0], [0, 0, 0, 0, 0, 1, -1, 0, 1, 0, 0, -1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 1, 1], [0, 4, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, -1, -1], [-1, 0, -1, -1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0], [-6, 0, 1, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 3, 0, 0, 0, -1, 1, 0, 0, 0, -2, 1, -1, 0], [0, -1, 0, 0, 0, -1, 1, 0, 2, 0, 0, 0, -1, -1], [-4, 0, 0, -3, 3, 0, 0, 3, 0, 1, 0, 0, 0, 0], [0, 7, 0, 0, 0, -2, 2, 0, 0, 0, 0, 3, 0, -1], [0, 4, 0, 0, 0, 1, -1, 0, -1, 0, 0, 0, -3, -1], [15, 0, -5, -3, -1, 2, 2, 0, 0, 0, 0, 0, 0, 0], [0, 6, 0, 0, 0, -2, 2, 0, -2, 0, -2, -2, 3, -1], [-21, 0, 5, 1, -2, 1, 1, 3, 0, -2, 0, 0, 0, 0], [0, -4, 0, 0, 0, -3, 3, 0, 0, 0, 2, -1, 0, -2], [0, -8, 0, 0, 0, -3, 3, 0, -5, 0, -2, -1, 0, 0], [23, 0, -1, 4, 1, -2, -2, 6, 0, -3, 0, 0, 0, 0], [0, 2, 0, 0, 0, -2, 2, 0, 0, 0, 0, -2, 5, 1], [0, -4, 0, 0, 0, 2, -2, 0, 5, 0, 4, -2, -5, 0], [0, 5, 0, 0, 0, 1, -1, 0, 2, 0, 2, 0, -7, 2], [0, -2, 0, 0, 0, -3, 3, 0, 0, 0, 2, -5, -1, -1], [0, 2, 0, 0, 0, 0, 0, 0, 0, 0, -4, -1, 2, 0], [7, 0, -1, -3, 6, -2, -2, -9, 0, 2, 0, 0, 0, 0], [-14, 0, 0, -9, -5, 1, 1, -6, 0, -3, 0, 0, 0, 0], [-35, 0, 5, -5, 1, 2, 2, 6, 0, -3, 0, 0, 0, 0], [17, 0, -9, 5, -4, 2, 2, 1, 0, 2, 0, 0, 0, 0], [0, -18, 0, 0, 0, 4, -4, 0, 0, 0, 4, -3, 1, 1], [22, 0, -4, 0, -3, 3, 3, 7, 0, 1, 0, 0, 0, 0], [32, 0, -14, 5, -5, 3, 3, -5, 0, 1, 0, 0, 0, 0], [0, 8, 0, 0, 0, 1, -1, 0, -5, 0, -4, -5, 5, -1], [0, 24, 0, 0, 0, -5, 5, 0, -5, 0, -5, 5, 2, 2], [0, -22, 0, 0, 0, -3, 3, 0, -2, 0, -3, -3, -8, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, -3, 8, 0], [-28, 0, 10, 13, 1, -4, -4, 11, 0, 2, 0, 0, 0, 0], [0, -18, 0, 0, 0, -4, 4, 0, 5, 0, 2, -1, -1, 1], [-78, 0, 10, -7, 8, 3, 3, -12, 0, 4, 0, 0, 0, 0], [-19, 0, 7, -11, -3, 3, 3, -13, 0, -1, 0, 0, 0, 0], [0, -11, 0, 0, 0, 1, -1, 0, -3, 0, -4, 4, 0, 0], [0, -28, 0, 0, 0, -5, 5, 0, -5, 0, -2, 2, 13, 3], [0, -5, 0, 0, 0, 1, -1, 0, 0, 0, 0, -4, 11, -4], [41, 0, -11, -8, -6, -1, -1, -1, 0, -2, 0, 0, 0, 0], [52, 0, -11, 6, 3, 3, 3, -16, 0, -3, 0, 0, 0, 0], [82, 0, -16, -7, 2, 5, 5, 2, 0, -1, 0, 0, 0, 0], [0, -10, 0, 0, 0, 0, 0, 0, -1, 0, -2, 5, 1, 3], [-3, 0, 1, -6, 6, -6, -6, 21, 0, -8, 0, 0, 0, 0], [0, 24, 0, 0, 0, 2, -2, 0, 0, 0, 0, -8, 9, 3], [108, 0, -26, 3, -9, 0, 0, 5, 0, -1, 0, 0, 0, 0], [0, 48, 0, 0, 0, 1, -1, 0, 1, 0, -1, 6, 0, 2], [-8, 0, 10, 5, 7, -2, -2, -23, 0, 4, 0, 0, 0, 0], [-37, 0, -15, 5, 3, 5, 5, 4, 0, 1, 0, 0, 0, 0], [0, -10, 0, 0, 0, -2, 2, 0, -4, 0, 6, -8, 2, -4], [-65, 0, 11, -7, 6, 1, 1, -23, 0, 2, 0, 0, 0, 0], [0, 32, 0, 0, 0, -3, 3, 0, 5, 0, 8, 4, 1, -4], [0, 30, 0, 0, 0, 4, -4, 0, -5, 0, -1, 0, -3, 3], [105, 0, -25, -7, -8, -4, -4, 42, 0, -6, 0, 0, 0, 0], [-115, 0, 19, -3, -2, 4, 4, -32, 0, 3, 0, 0, 0, 0], [0, -9, 0, 0, 0, -4, 4, 0, -5, 0, 6, 5, -14, -2], [0, 4, 0, 0, 0, -2, 2, 0, 3, 0, 2, -2, -10, -9], [0, 26, 0, 0, 0, -4, 4, 0, 5, 0, 6, -15, 0, -2], [134, 0, 6, 7, -4, -10, -10, 10, 0, -10, 0, 0, 0, 0], [-1, 0, 15, -2, 2, -5, -5, 17, 0, -6, 0, 0, 0, 0], [60, 0, -34, -10, 9, 3, 3, 4, 0, 7, 0, 0, 0, 0], [25, 0, -3, -3, 1, 3, 3, -9, 0, -8, 0, 0, 0, 0], [123, 0, -1, 11, 2, -2, -2, -23, 0, 4, 0, 0, 0, 0], [0, -7, 0, 0, 0, 4, -4, 0, -15, 0, -4, -7, 5, 5], [0, -39, 0, 0, 0, -2, 2, 0, 0, 0, -8, 2, 2, -7], [0, -40, 0, 0, 0, -1, 1, 0, -15, 0, -6, 5, -2, -4], [-55, 0, 27, -15, 11, -1, -1, -4, 0, 7, 0, 0, 0, 0], [45, 0, -7, 2, -6, 1, 1, 13, 0, -14, 0, 0, 0, 0], [0, -38, 0, 0, 0, 7, -7, 0, 12, 0, 12, -12, -17, -1], [0, 130, 0, 0, 0, 7, -7, 0, -2, 0, -2, -1, 8, -2], [15, 0, -11, -20, 14, 4, 4, 29, 0, -2, 0, 0, 0, 0], [0, 45, 0, 0, 0, -10, 10, 0, -11, 0, -8, -7, -7, -3], [0, 32, 0, 0, 0, 3, -3, 0, -3, 0, -10, 12, -6, 2], [0, -38, 0, 0, 0, -1, 1, 0, 10, 0, 6, 3, -20, -6], [0, -100, 0, 0, 0, 1, -1, 0, -3, 0, -18, 8, 0, 2], [7, 0, 15, -7, 8, -7, -7, 37, 0, 4, 0, 0, 0, 0], [0, 34, 0, 0, 0, 8, -8, 0, 3, 0, -10, -3, 6, 4], [17, 0, -1, 19, -7, 6, 6, -21, 0, 2, 0, 0, 0, 0], [97, 0, 1, -14, -8, 7, 7, -23, 0, -6, 0, 0, 0, 0], [-85, 0, 24, 11, 13, -7, -7, 37, 0, 3, 0, 0, 0, 0], [-167, 0, -7, 9, 2, -12, -12, 21, 0, 12, 0, 0, 0, 0], [100, 0, 7, -3, -7, 2, 2, 8, 0, 1, 0, 0, 0, 0], [0, 18, 0, 0, 0, 5, -5, 0, -15, 0, -4, -11, 5, -3], [33, 0, 15, -29, 22, 2, 2, -3, 0, 4, 0, 0, 0, 0], [-21, 0, -27, -28, 9, 4, 4, -36, 0, 13, 0, 0, 0, 0], [-188, 0, 38, 18, 11, -13, -13, -14, 0, 0, 0, 0, 0, 0], [0, 24, 0, 0, 0, 12, -12, 0, -4, 0, 7, -24, -6, -4], [0, -66, 0, 0, 0, 1, -1, 0, -12, 0, -18, -8, 16, 6], [0, -79, 0, 0, 0, 9, -9, 0, 5, 0, -2, 21, -11, 2], [-82, 0, -28, 11, 12, 15, 15, -38, 0, 4, 0, 0, 0, 0], [0, 48, 0, 0, 0, 5, -5, 0, 20, 0, 14, 11, -15, -5], [147, 0, 35, 6, 7, -4, -4, -42, 0, 9, 0, 0, 0, 0], [0, -10, 0, 0, 0, 16, -16, 0, 10, 0, 5, -9, 9, -7], [0, -86, 0, 0, 0, 9, -9, 0, 2, 0, -4, -2, -4, 0], [75, 0, -1, -7, -4, 0, 0, 21, 0, -18, 0, 0, 0, 0], [-263, 0, 25, -20, 0, 10, 10, -29, 0, -1, 0, 0, 0, 0], [-70, 0, 28, -7, 16, -18, -18, 40, 0, -4, 0, 0, 0, 0], [-38, 0, 9, 48, -24, -15, -15, 1, 0, -18, 0, 0, 0, 0], [0, 162, 0, 0, 0, -3, 3, 0, 1, 0, 6, -2, -16, 8], [0, 68, 0, 0, 0, -4, 4, 0, 3, 0, -6, 21, -17, 7], [0, -28, 0, 0, 0, 11, -11, 0, -5, 0, -8, -1, 5, 3], [111, 0, -7, 2, -8, -9, -9, -27, 0, -2, 0, 0, 0, 0], [-38, 0, -33, -15, 1, -4, -4, 40, 0, -17, 0, 0, 0, 0], [209, 0, 7, 29, 30, -8, -8, 25, 0, 0, 0, 0, 0, 0], [-157, 0, -18, 32, -25, 4, 4, 25, 0, 5, 0, 0, 0, 0], [0, 58, 0, 0, 0, -9, 9, 0, -3, 0, 14, 4, -9, -3], [68, 0, -12, 10, 14, -6, -6, 20, 0, 22, 0, 0, 0, 0], [223, 0, -11, -24, 20, -17, -17, 16, 0, -6, 0, 0, 0, 0], [-106, 0, 20, -4, -11, -19, -19, 15, 0, -7, 0, 0, 0, 0], [0, -21, 0, 0, 0, -19, 19, 0, -3, 0, 2, 4, 5, -14], [0, -12, 0, 0, 0, -19, 19, 0, 9, 0, -6, 14, -36, 7], [0, 18, 0, 0, 0, 0, 0, 0, 10, 0, 18, -3, 10, 12], [0, 7, 0, 0, 0, 15, -15, 0, 0, 0, -20, -5, 4, -3], [0, 26, 0, 0, 0, 22, -22, 0, -5, 0, -9, -29, 20, 0], [-74, 0, -26, -14, 18, 7, 7, 38, 0, 6, 0, 0, 0, 0], [-41, 0, -11, 2, -16, 3, 3, -41, 0, -2, 0, 0, 0, 0], [-42, 0, -36, 3, 25, -10, -10, 15, 0, 5, 0, 0, 0, 0], [-254, 0, 8, 19, 28, 3, 3, -52, 0, 1, 0, 0, 0, 0], [293, 0, 33, -24, 20, -5, -5, -19, 0, -3, 0, 0, 0, 0], [-111, 0, 7, 11, -7, -13, -13, -2, 0, -13, 0, 0, 0, 0], [21, 0, -15, -12, -30, 1, 1, 45, 0, 10, 0, 0, 0, 0], [0, 110, 0, 0, 0, 10, -10, 0, -10, 0, -4, 29, -16, 14], [0, 26, 0, 0, 0, 0, 0, 0, -12, 0, 14, -1, -18, 10], [176, 0, 12, -16, -19, 15, 15, 35, 0, 11, 0, 0, 0, 0], [14, 0, 10, -13, 0, 4, 4, 5, 0, 15, 0, 0, 0, 0], [227, 0, 25, 12, 10, -14, -14, 40, 0, -15, 0, 0, 0, 0], [0, -27, 0, 0, 0, 11, -11, 0, -10, 0, 12, 19, 7, 11], [0, -148, 0, 0, 0, -2, 2, 0, 0, 0, -14, 22, -1, -2], [0, -100, 0, 0, 0, 28, -28, 0, 10, 0, -2, -10, -54, 3], [249, 0, 25, -19, -24, 2, 2, -44, 0, -8, 0, 0, 0, 0], [0, 9, 0, 0, 0, -2, 2, 0, -3, 0, 4, -24, -17, -2], [-311, 0, 11, 5, -28, -6, -6, 7, 0, -16, 0, 0, 0, 0], [271, 0, -29, -6, -23, -8, -8, -24, 0, -6, 0, 0, 0, 0], [0, 176, 0, 0, 0, 4, -4, 0, -15, 0, 2, 2, 22, -9], [0, 55, 0, 0, 0, 15, -15, 0, -28, 0, -12, 6, 17, 3], [0, 172, 0, 0, 0, -33, 33, 0, -23, 0, -14, -7, 38, -2], [86, 0, -16, 85, 2, -3, -3, 32, 0, 0, 0, 0, 0, 0], [0, -198, 0, 0, 0, -17, 17, 0, -20, 0, 0, 3, 31, -17], [127, 0, 37, -63, 20, 3, 3, -15, 0, 10, 0, 0, 0, 0], [0, 190, 0, 0, 0, 5, -5, 0, 5, 0, 14, -14, -21, -9], [0, 55, 0, 0, 0, -1, 1, 0, 10, 0, 28, -44, 19, -3], [-240, 0, 51, 19, 12, -11, -11, -13, 0, -6, 0, 0, 0, 0], [51, 0, -49, -60, 9, 3, 3, 28, 0, -21, 0, 0, 0, 0], [0, -18, 0, 0, 0, 20, -20, 0, 0, 0, -12, 12, -15, -13], [0, 97, 0, 0, 0, -6, 6, 0, -25, 0, -18, 2, 54, 21], [0, -198, 0, 0, 0, 3, -3, 0, 15, 0, 28, -1, -46, -10], [204, 0, 6, 10, -46, -6, -6, -31, 0, 3, 0, 0, 0, 0], [35, 0, -1, -33, 25, 17, 17, -90, 0, 20, 0, 0, 0, 0], [406, 0, 54, -42, 29, 20, 20, 18, 0, 0, 0, 0, 0, 0], [0, 13, 0, 0, 0, 11, -11, 0, 2, 0, 26, -42, -13, 4], [284, 0, 28, 70, 13, -21, -21, -57, 0, 9, 0, 0, 0, 0], [0, -98, 0, 0, 0, -20, 20, 0, -5, 0, 18, -3, -1, -7], [-173, 0, 31, 54, -40, -3, -3, 15, 0, -14, 0, 0, 0, 0], [0, -124, 0, 0, 0, 29, -29, 0, -4, 0, -16, 10, -22, -10], [0, -46, 0, 0, 0, 14, -14, 0, 25, 0, 0, 19, 28, 12], [0, -92, 0, 0, 0, 11, -11, 0, 15, 0, -22, -2, -23, 3], [0, 48, 0, 0, 0, -13, 13, 0, 19, 0, 6, 11, 27, -11], [-264, 0, -96, -72, 19, 25, 25, 33, 0, 25, 0, 0, 0, 0], [0, -212, 0, 0, 0, 10, -10, 0, 13, 0, -20, 4, 20, 8], [518, 0, 0, 8, -4, -12, -12, 10, 0, -14, 0, 0, 0, 0], [0, 27, 0, 0, 0, -11, 11, 0, -15, 0, -26, 11, 37, 11], [0, 135, 0, 0, 0, -4, 4, 0, -17, 0, -22, -16, 48, -2], [335, 0, 7, -4, 16, -21, -21, 31, 0, 2, 0, 0, 0, 0], [-56, 0, -70, -72, 7, 38, 38, -33, 0, 18, 0, 0, 0, 0], [0, -72, 0, 0, 0, 8, -8, 0, 26, 0, 22, 9, -38, 10], [392, 0, -7, -16, 2, 31, 31, 47, 0, 4, 0, 0, 0, 0], [680, 0, -10, -58, 38, -3, -3, -22, 0, -14, 0, 0, 0, 0], [449, 0, -53, 12, -6, 7, 7, 9, 0, 8, 0, 0, 0, 0], [0, 26, 0, 0, 0, -25, 25, 0, -25, 0, -2, -18, -16, -20], [-430, 0, 22, -12, -6, -18, -18, 34, 0, -42, 0, 0, 0, 0], [-523, 0, -63, 25, 6, 6, 6, 15, 0, -27, 0, 0, 0, 0], [0, 67, 0, 0, 0, 28, -28, 0, 16, 0, 22, -28, -35, -26], [0, -184, 0, 0, 0, -12, 12, 0, 0, 0, -1, 14, 23, 1], [0, 124, 0, 0, 0, 14, -14, 0, -15, 0, 4, -35, 10, -10], [70, 0, 28, -48, -11, 11, 11, -80, 0, -4, 0, 0, 0, 0], [355, 0, -69, -38, 25, 8, 8, 30, 0, 5, 0, 0, 0, 0], [0, 119, 0, 0, 0, -36, 36, 0, -35, 0, -24, 28, 31, 9], [0, 124, 0, 0, 0, -24, 24, 0, -25, 0, -28, -26, 30, -6], [0, -280, 0, 0, 0, -3, 3, 0, -16, 0, 4, -30, 41, -1], [-229, 0, -47, -17, -9, -29, -29, 41, 0, -3, 0, 0, 0, 0], [0, -42, 0, 0, 0, -32, 32, 0, 15, 0, 4, -36, 27, -5], [-76, 0, -46, -45, 42, 22, 22, -12, 0, 6, 0, 0, 0, 0], [0, -6, 0, 0, 0, 19, -19, 0, 28, 0, 25, 22, -74, -16], [0, 120, 0, 0, 0, 32, -32, 0, 34, 0, -2, -13, -6, 13], [-641, 0, 1, -29, 5, -16, -16, -130, 0, -5, 0, 0, 0, 0], [0, -208, 0, 0, 0, -16, 16, 0, 0, 0, 0, -16, 2, 6], [-628, 0, 32, 27, 47, -15, -15, -28, 0, 24, 0, 0, 0, 0], [82, 0, 86, -100, -5, 13, 13, -75, 0, -9, 0, 0, 0, 0], [-75, 0, 85, 5, -9, -20, -20, 41, 0, -5, 0, 0, 0, 0], [205, 0, -101, 56, -23, 8, 8, -57, 0, 3, 0, 0, 0, 0], [0, -104, 0, 0, 0, 12, -12, 0, 14, 0, 9, 10, 35, 25], [0, 62, 0, 0, 0, -16, 16, 0, -56, 0, -10, -17, 1, -13], [0, -189, 0, 0, 0, 13, -13, 0, 0, 0, -66, 19, -13, 16], [0, 216, 0, 0, 0, -55, 55, 0, -12, 0, 14, 11, 15, -15], [-343, 0, -35, 8, 10, 29, 29, 25, 0, 0, 0, 0, 0, 0], [-946, 0, 18, 65, -48, -21, -21, 86, 0, -6, 0, 0, 0, 0], [-798, 0, -8, -17, 42, 3, 3, 42, 0, -1, 0, 0, 0, 0], [0, -143, 0, 0, 0, 1, -1, 0, 0, 0, -26, -3, -62, 0], [-464, 0, 28, -32, -29, 23, 23, -34, 0, -38, 0, 0, 0, 0], [0, -204, 0, 0, 0, -19, 19, 0, 9, 0, -34, 8, -13, -8], [718, 0, 12, 6, -23, 17, 17, -18, 0, -5, 0, 0, 0, 0], [-245, 0, -31, -15, -23, -27, -27, 122, 0, -11, 0, 0, 0, 0], [-610, 0, 31, 63, -54, 21, 21, -43, 0, 2, 0, 0, 0, 0], [0, 79, 0, 0, 0, 10, -10, 0, -10, 0, -4, 44, -52, 8], [0, -72, 0, 0, 0, -25, 25, 0, 9, 0, -10, 83, -45, 3], [0, 180, 0, 0, 0, 37, -37, 0, 28, 0, -10, 41, 31, 5], [346, 0, 60, 33, 10, 13, 13, -15, 0, -23, 0, 0, 0, 0], [0, 224, 0, 0, 0, -11, 11, 0, -30, 0, -2, 32, 59, -3], [0, 34, 0, 0, 0, 23, -23, 0, -25, 0, -20, 48, -6, 28], [201, 0, 37, 84, 17, -20, -20, -114, 0, -9, 0, 0, 0, 0], [0, -88, 0, 0, 0, -29, 29, 0, -37, 0, -30, 58, -8, 12], [0, -14, 0, 0, 0, 0, 0, 0, 2, 0, -20, -37, 39, 11], [0, 58, 0, 0, 0, -34, 34, 0, -33, 0, 4, 1, 4, 32], [-188, 0, -38, 56, 64, 12, 12, -47, 0, 3, 0, 0, 0, 0], [0, -69, 0, 0, 0, 29, -29, 0, -35, 0, -24, -42, 66, 7], [795, 0, -19, 11, 37, -21, -21, -18, 0, -11, 0, 0, 0, 0], [0, -66, 0, 0, 0, -4, 4, 0, 25, 0, 16, -20, -7, -1], [0, 164, 0, 0, 0, -12, 12, 0, 14, 0, 30, -43, -40, 14], [0, 330, 0, 0, 0, -12, 12, 0, 20, 0, -24, 32, -22, -14], [-387, 0, 9, -16, 16, -26, -26, -89, 0, 22, 0, 0, 0, 0], [160, 0, -94, -93, 5, 0, 0, 9, 0, -13, 0, 0, 0, 0], [0, 17, 0, 0, 0, 28, -28, 0, 6, 0, 22, -61, 93, 19], [0, 152, 0, 0, 0, 17, -17, 0, -31, 0, -46, -5, 39, 41], [0, 44, 0, 0, 0, 11, -11, 0, -22, 0, 2, 35, 78, 16], [-101, 0, 79, 31, 75, 23, 23, -16, 0, 21, 0, 0, 0, 0], [829, 0, 93, -34, 9, 10, 10, -2, 0, 44, 0, 0, 0, 0], [479, 0, -88, -6, -42, 28, 28, -82, 0, 26, 0, 0, 0, 0], [-546, 0, 56, -31, -14, -43, -43, 30, 0, -60, 0, 0, 0, 0], [73, 0, -5, -28, 16, 18, 18, 61, 0, -38, 0, 0, 0, 0], [0, 78, 0, 0, 0, 7, -7, 0, 37, 0, 10, 61, -101, 3], [0, -262, 0, 0, 0, -30, 30, 0, 5, 0, 25, 0, 2, -20], [-637, 0, -99, -89, -9, 20, 20, 76, 0, 27, 0, 0, 0, 0], [-499, 0, 1, -38, -54, -5, -5, -64, 0, -11, 0, 0, 0, 0], [0, 49, 0, 0, 0, -11, 11, 0, -8, 0, 20, -26, 100, 29], [0, -24, 0, 0, 0, -13, 13, 0, 0, 0, 2, 5, 13, -17], [40, 0, -19, -12, 8, 22, 22, 113, 0, -24, 0, 0, 0, 0], [-1284, 0, 46, 2, -24, 10, 10, -138, 0, -16, 0, 0, 0, 0], [0, 142, 0, 0, 0, 30, -30, 0, 20, 0, 25, -8, 41, -13], [0, -294, 0, 0, 0, 21, -21, 0, -34, 0, 17, 1, 27, 3], [406, 0, -56, -30, 13, 17, 17, 9, 0, 30, 0, 0, 0, 0], [88, 0, 38, -17, 1, 12, 12, -59, 0, 7, 0, 0, 0, 0], [974, 0, 20, 51, 8, -56, -56, 153, 0, 6, 0, 0, 0, 0], [-1214, 0, -44, 23, -50, -19, -19, 15, 0, -21, 0, 0, 0, 0], [0, -102, 0, 0, 0, -31, 31, 0, 22, 0, -24, 72, -32, 4], [540, 0, -24, -13, 9, -30, -30, 245, 0, 7, 0, 0, 0, 0], [784, 0, 62, 23, -5, -5, -5, -65, 0, -5, 0, 0, 0, 0], [374, 0, 92, 70, 9, -7, -7, -171, 0, 3, 0, 0, 0, 0], [0, 100, 0, 0, 0, -45, 45, 0, 10, 0, -30, 50, -49, -9], [0, 44, 0, 0, 0, 47, -47, 0, -15, 0, -17, -16, 17, -17], [-1410, 0, -5, -16, 4, -1, -1, 19, 0, -30, 0, 0, 0, 0], [0, -114, 0, 0, 0, 1, -1, 0, 15, 0, -38, -26, 55, 3], [0, 22, 0, 0, 0, 10, -10, 0, 15, 0, -33, 38, 21, 27], [-318, 0, 18, 44, -38, -34, -34, 142, 0, 34, 0, 0, 0, 0], [0, 221, 0, 0, 0, 51, -51, 0, 20, 0, 20, -29, 18, 9], [1492, 0, 103, -8, -40, -29, -29, -61, 0, -10, 0, 0, 0, 0], [0, 63, 0, 0, 0, -10, 10, 0, 52, 0, -8, 22, -72, -15], [0, 33, 0, 0, 0, 8, -8, 0, -27, 0, -18, 58, 71, 20], [-589, 0, -53, 103, -30, -48, -48, 40, 0, -10, 0, 0, 0, 0], [0, 155, 0, 0, 0, 27, -27, 0, 15, 0, 22, 35, -79, 35], [-268, 0, 0, 1, 58, -39, -39, -76, 0, -6, 0, 0, 0, 0], [0, 79, 0, 0, 0, 4, -4, 0, 7, 0, 40, -70, -31, 19], [0, 36, 0, 0, 0, 3, -3, 0, 10, 0, 46, -53, 56, 9], [-24, 0, -18, -102, -15, 34, 34, 54, 0, 31, 0, 0, 0, 0], [1290, 0, -16, 74, 21, -31, -31, 81, 0, 2, 0, 0, 0, 0], [0, 16, 0, 0, 0, -21, 21, 0, -15, 0, 64, -30, -12, -36], [-108, 0, 46, -78, 34, 0, 0, -31, 0, 31, 0, 0, 0, 0], [855, 0, -7, 45, -25, -16, -16, 144, 0, -39, 0, 0, 0, 0], [0, 61, 0, 0, 0, -33, 33, 0, -36, 0, 26, 14, 41, 2], [0, -266, 0, 0, 0, 69, -69, 0, 41, 0, 36, -35, 10, 20], [1065, 0, 19, 31, 49, 14, 14, -146, 0, 13, 0, 0, 0, 0], [0, -168, 0, 0, 0, -33, 33, 0, -5, 0, 0, -3, -7, -41], [-389, 0, -81, -41, -62, 32, 32, -162, 0, 1, 0, 0, 0, 0], [-1422, 0, -60, -71, 52, -11, -11, 116, 0, 51, 0, 0, 0, 0], [0, 167, 0, 0, 0, -20, 20, 0, 73, 0, 26, 35, -35, -2], [1122, 0, 74, -38, 14, 9, 9, -180, 0, 12, 0, 0, 0, 0], [-574, 0, -75, -43, 93, 10, 10, 58, 0, 81, 0, 0, 0, 0], [-395, 0, -49, 99, -12, 12, 12, 164, 0, -33, 0, 0, 0, 0], [0, 112, 0, 0, 0, 56, -56, 0, 60, 0, 41, 0, 0, -2], [447, 0, -109, 23, -44, -32, -32, 196, 0, -13, 0, 0, 0, 0], [0, -128, 0, 0, 0, -45, 45, 0, -3, 0, 42, -32, -12, 4], [380, 0, 16, 97, 20, -9, -9, 80, 0, 10, 0, 0, 0, 0], [-333, 0, -63, 51, -72, -38, -38, 117, 0, -82, 0, 0, 0, 0], [0, -46, 0, 0, 0, 48, -48, 0, 55, 0, 28, 10, -23, -7], [0, -82, 0, 0, 0, 29, -29, 0, 76, 0, 23, -29, 40, -4], [0, 32, 0, 0, 0, 6, -6, 0, 0, 0, -20, 6, 61, -39], [974, 0, 44, 51, -35, -12, -12, -155, 0, -15, 0, 0, 0, 0], [0, 238, 0, 0, 0, 9, -9, 0, 15, 0, 14, -78, -45, -23], [732, 0, 14, 0, -4, -78, -78, 132, 0, 2, 0, 0, 0, 0], [0, 12, 0, 0, 0, 28, -28, 0, 66, 0, 34, 0, -53, -24], [-1753, 0, -79, 31, 42, 9, 9, 13, 0, -4, 0, 0, 0, 0], [99, 0, -13, 82, 37, 3, 3, -4, 0, 47, 0, 0, 0, 0], [0, -181, 0, 0, 0, 58, -58, 0, 45, 0, 14, 69, 38, 2], [658, 0, 112, 6, 0, -12, -12, -85, 0, 55, 0, 0, 0, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_1900_e_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_1900_3_e_g();".
// 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_1900_3_e_g(:prec:=14)
    chi := MakeCharacter_1900_e();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 3));
    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_1900_3_e_g();".
// 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_1900_3_e_g( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1900_e();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<3,R![151875, 0, 1994425, 0, 1440495, 0, 390297, 0, 49092, 0, 3026, 0, 89, 0, 1]>,<7,R![-135988, -56107, 37276, 9845, -640, -204, 2, 1]>],Snew);
    return Vf;
end function;