
// Make newform 1690.2.b.g in Magma, downloaded from the LMFDB on 04 September 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_1690_b();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_1690_b_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_1690_2_b_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_1690_2_b_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 := [1, 0, 116, 0, 1342, 0, 5559, 0, 9369, 0, 6147, 0, 1977, 0, 336, 0, 29, 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, 0, 0, 0], [3368, 0, 29179, 0, -816799, 0, -3075069, 0, -2409607, 0, -827089, 0, -144249, 0, -12547, 0, -432, 0], [707, 0, 829845, 0, 5295445, 0, 10011455, 0, 6492859, 0, 2001364, 0, 322446, 0, 26281, 0, 856, 0], [0, 406523, 0, 1772002, 0, -4301121, 0, -18502165, 0, -14407793, 0, -4897329, 0, -847341, 0, -73294, 0, -2515], [0, 361509, 0, 5336655, 0, 21797781, 0, 33964399, 0, 21530185, 0, 6802785, 0, 1144195, 0, 98104, 0, 3368], [-46428, 0, 1904963, 0, 15508012, 0, 32443654, 0, 22952260, 0, 7697386, 0, 1346644, 0, 118836, 0, 4171, 0], [0, -46501, 0, -1338777, 0, -9550958, 0, -21244807, 0, -15531886, 0, -5331200, 0, -950203, 0, -85171, 0, -3029], [-31172, 0, -1338777, 0, -9550958, 0, -21244807, 0, -15531886, 0, -5331200, 0, -950203, 0, -85171, 0, -3029, 0], [-92149, 0, -3346638, 0, -25065847, 0, -55244447, 0, -38534249, 0, -12541401, 0, -2119481, 0, -180588, 0, -6131, 0], [79733, -915745, -3213, -12131704, -8013857, -62362390, -24803429, -120016060, -19555121, -82094204, -6937809, -26860880, -1260595, -4601498, -114474, -398613, -4110, -13766], [-79733, -854429, 3213, -12131704, 8013857, -62362390, 24803429, -120016060, 19555121, -82094204, 6937809, -26860880, 1260595, -4601498, 114474, -398613, 4110, -13766], [-79733, -915745, 3213, -12131704, 8013857, -62362390, 24803429, -120016060, 19555121, -82094204, 6937809, -26860880, 1260595, -4601498, 114474, -398613, 4110, -13766], [0, -202467, 0, -6982406, 0, -41597664, 0, -83273778, 0, -57967748, 0, -19216808, 0, -3329358, 0, -291319, 0, -10150], [54770, 262062, 7187961, 17971729, 52656511, 126747090, 112857433, 270363038, 81232929, 189974768, 27613905, 62840088, 4885933, 10824192, 435329, 940588, 15404, 32545], [54770, -262062, 7187961, -17971729, 52656511, -126747090, 112857433, -270363038, 81232929, -189974768, 27613905, -62840088, 4885933, -10824192, 435329, -940588, 15404, -32545], [0, -795555, 0, -16438290, 0, -92055196, 0, -182528584, 0, -126143694, 0, -41526008, 0, -7146796, 0, -621517, 0, -21536], [127283, -1963964, -684324, -36773039, -14356125, -197167137, -38966233, -379295843, -28512715, -260645191, -9463207, -85837875, -1615097, -14809199, -138352, -1291933, -4711, -44912], [-124455, -1963964, 4003704, -36773039, 35537905, -197167137, 79012053, -379295843, 54484151, -260645191, 17468663, -85837875, 2904881, -14809199, 243476, -1291933, 8135, -44912]];
    Rf_basisdens := [1, 30658, 15329, 30658, 30658, 30658, 15329, 15329, 30658, 61316, 61316, 61316, 30658, 61316, 61316, 30658, 61316, 61316];
    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_1690_b();"
function MakeCharacter_1690_b()
    N := 1690;
    order := 2;
    char_gens := [677, 171];
    v := [1, 2];
    // 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_1690_b_Hecke();"
function MakeCharacter_1690_b_Hecke( : Kf := false)
    N := 1690;
    order := 2;
    char_gens := [677, 171];
    char_values := [[-1, 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, 0, 0, 0, 0, 0, 0, 0, 0]];
    assert UnitGenerators(DirichletGroup(N)) eq char_gens;
    values := ConvertToHeckeField(char_values : pass_field := ISA(Type(Kf), Fld), 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]];
    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, -1, 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, 0, -1, 0, 0], [1, -1, 1, 0, 0, 1, 0, -1, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0], [0, 0, -1, 1, 1, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 1, 1], [-1, 0, 1, 0, 0, 1, 0, 0, -1, 1, 0, -1, 0, 0, 0, 0, 1, -1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 3, 0, 0, 1, 0, 0, -1, -2, 1, 2, 1, -1, 1, 0, 0], [-1, 1, 0, 0, 0, -1, 0, 2, -2, -1, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 1, -4, 0, 0, 3, 0, 0, 1, 4, -3, -2, -1, 1, -1, -1, -1], [-2, -1, 1, 0, 0, 3, 0, -1, 0, 0, 0, 0, 0, -1, -1, 0, 2, -2], [-2, 2, -2, 0, 0, 2, 0, 4, 0, -2, 0, 2, 0, -1, -1, 0, 2, -2], [0, 0, 0, 2, 2, 0, 2, 0, 0, -1, -2, 1, 0, -1, 1, -2, 0, 0], [4, 2, -1, 0, 0, -3, 0, 1, 0, -1, 0, 1, 0, 0, 0, 0, -1, 1], [0, 0, 1, 2, 7, 0, 1, 0, 0, 1, -1, 2, 4, 1, -1, 2, -1, -1], [0, 0, 1, -6, -2, 0, 1, 0, 0, 3, 6, -3, -4, -2, 2, -3, -1, -1], [0, 0, -2, 4, 2, 0, -4, 0, 0, -3, -6, 3, 0, 3, -3, 0, 2, 2], [-1, -1, 5, 0, 0, 0, 0, -5, 0, 3, 0, -3, 0, -2, -2, 0, 0, 0], [1, 1, 2, 0, 0, 0, 0, -1, 2, -1, 0, 1, 0, -3, -3, 0, 0, 0], [0, 0, -1, 5, 1, 0, -1, 0, 0, -2, 1, -3, 1, 1, -1, -1, 1, 1], [4, -8, 4, 0, 0, 2, 0, -8, 4, 3, 0, -3, 0, -3, -3, 0, -4, 4], [0, 0, -1, -3, -5, 0, 0, 0, 0, -2, -1, -1, -5, -2, 2, -2, 1, 1], [0, 6, 0, 0, 0, -2, 0, 6, -2, -2, 0, 2, 0, 2, 2, 0, 0, 0], [0, 0, 0, -5, 1, 0, 4, 0, 0, 1, 4, -3, 1, -2, 2, -4, 0, 0], [-8, -1, -7, 0, 0, -3, 0, 6, -1, -1, 0, 1, 0, 1, 1, 0, 0, 0], [0, 0, 0, -1, -2, 0, 3, 0, 0, -1, 2, -3, -4, -3, 3, -5, 0, 0], [7, -2, 0, 0, 0, -1, 0, -5, 5, -3, 0, 3, 0, -3, -3, 0, -2, 2], [0, 0, 1, 1, 7, 0, 2, 0, 0, 1, 3, -2, -4, -1, 1, 0, -1, -1], [0, 0, 5, -8, -3, 0, 4, 0, 0, 2, 7, -5, 2, -1, 1, -1, -5, -5], [3, -5, 6, 0, 0, 0, 0, -9, 0, 2, 0, -2, 0, -1, -1, 0, 0, 0], [0, 0, 1, 1, 7, 0, 4, 0, 0, 2, 5, -3, 7, 0, 0, 0, -1, -1], [0, 0, 4, 1, -1, 0, 6, 0, 0, 3, 5, -2, 4, -2, 2, 0, -4, -4], [1, 5, -4, 0, 0, 1, 0, 2, -2, 1, 0, -1, 0, 0, 0, 0, 2, -2], [0, 0, 1, -1, 1, 0, 0, 0, 0, -2, -3, 1, -1, 2, -2, -4, -1, -1], [3, 4, -7, 0, 0, -3, 0, -2, 1, -1, 0, 1, 0, 0, 0, 0, -1, 1], [-4, 5, 5, 0, 0, 3, 0, -1, 0, -1, 0, 1, 0, -2, -2, 0, 2, -2], [-4, 8, -4, 0, 0, -2, 0, 0, 0, -2, 0, 2, 0, -1, -1, 0, 2, -2], [0, 0, 2, -6, -10, 0, 0, 0, 0, -1, 0, -1, 0, -2, 2, -2, -2, -2], [0, 0, 2, 0, -2, 0, -1, 0, 0, 4, 5, -1, 5, 0, 0, 0, -2, -2], [0, 0, 0, -7, -3, 0, -2, 0, 0, 4, 5, -1, -2, 0, 0, 0, 0, 0], [0, 0, -3, 8, 6, 0, 0, 0, 0, -6, -6, 0, -2, 2, -2, 0, 3, 3], [1, -4, -1, 0, 0, 3, 0, 0, -1, -1, 0, 1, 0, -2, -2, 0, -1, 1], [1, -10, 3, 0, 0, 1, 0, -9, 1, 3, 0, -3, 0, -1, -1, 0, -3, 3], [-10, 6, -11, 0, 0, -6, 0, 20, -2, -3, 0, 3, 0, 5, 5, 0, 1, -1], [0, 0, 0, 4, 5, 0, -4, 0, 0, 2, -3, 5, -2, 0, 0, 3, 0, 0], [0, 0, 0, 4, 12, 0, 0, 0, 0, 2, -4, 6, 10, 1, -1, 2, 0, 0], [6, 0, 4, 0, 0, -6, 0, 0, -4, -1, 0, 1, 0, 2, 2, 0, -2, 2], [3, 4, 3, 0, 0, -1, 0, -4, -1, 3, 0, -3, 0, -2, -2, 0, 1, -1], [0, 0, -4, 5, 0, 0, 0, 0, 0, -3, -5, 2, -7, -1, 1, -1, 4, 4], [0, 0, -6, 8, 1, 0, -12, 0, 0, -2, -14, 12, 4, 6, -6, 3, 6, 6], [-14, 7, -6, 0, 0, -1, 0, 11, -6, 2, 0, -2, 0, 3, 3, 0, 3, -3], [0, 0, -3, 1, 5, 0, -4, 0, 0, 4, -1, 5, -9, 4, -4, 4, 3, 3], [-2, 8, -6, 0, 0, -2, 0, 8, 0, -3, 0, 3, 0, 4, 4, 0, 4, -4], [-3, 2, -2, 0, 0, 1, 0, 3, -1, -1, 0, 1, 0, 0, 0, 0, 6, -6], [9, -6, 7, 0, 0, 3, 0, -10, 3, 1, 0, -1, 0, -4, -4, 0, -1, 1], [0, 0, 4, -6, -7, 0, -2, 0, 0, 2, 9, -7, -6, 2, -2, -3, -4, -4], [0, 0, 2, 11, 11, 0, -2, 0, 0, 1, -3, 4, 10, 0, 0, 2, -2, -2], [6, -7, 4, 0, 0, 5, 0, -11, 6, 2, 0, -2, 0, -1, -1, 0, 3, -3], [-4, 0, 8, 0, 0, 2, 0, -2, -4, 0, 0, 0, 0, 1, 1, 0, 0, 0], [0, 0, -5, 0, -4, 0, -4, 0, 0, 1, 2, -1, -4, -2, 2, -4, 5, 5], [1, 1, 8, 0, 0, -2, 0, 3, -5, 0, 0, 0, 0, 5, 5, 0, 1, -1], [0, 0, 0, 7, 9, 0, -4, 0, 0, -7, -10, 3, 9, 4, -4, 8, 0, 0], [0, 0, -2, 6, -2, 0, -4, 0, 0, 3, 0, 3, 10, 0, 0, 4, 2, 2], [0, 0, 4, -4, 4, 0, 3, 0, 0, 2, 1, 1, 5, -2, 2, -2, -4, -4], [-2, 8, 0, 0, 0, -2, 0, -4, 0, -1, 0, 1, 0, 1, 1, 0, 0, 0], [0, 0, 2, 3, 8, 0, 7, 0, 0, -3, 0, -3, -4, -5, 5, -1, -2, -2], [0, 0, -3, 10, 2, 0, -8, 0, 0, -1, -12, 11, 2, 3, -3, 0, 3, 3], [-18, 2, -4, 0, 0, 2, 0, 8, -10, 2, 0, -2, 0, 2, 2, 0, 8, -8], [0, 0, 0, 6, 3, 0, 4, 0, 0, 2, 1, 1, 8, 0, 0, 1, 0, 0], [0, 0, 1, -13, 6, 0, 6, 0, 0, 5, 5, 0, -7, -7, 7, -1, -1, -1], [2, -6, 1, 0, 0, 4, 0, -10, 2, 3, 0, -3, 0, -5, -5, 0, -1, 1], [0, 0, 4, -1, -6, 0, -1, 0, 0, -3, -10, 7, 8, 1, -1, 11, -4, -4], [0, 0, -3, 0, 0, 4, 0, -8, -2, 3, 0, -3, 0, -2, -2, 0, 3, -3], [0, 0, -1, 5, -8, 0, 2, 0, 0, -1, -5, 4, -7, 0, 0, 3, 1, 1], [0, 0, 1, -2, 14, 0, -4, 0, 0, 5, 2, 3, 10, 2, -2, 4, -1, -1], [-5, 9, -13, 0, 0, -8, 0, 19, 0, -5, 0, 5, 0, 4, 4, 0, -2, 2], [0, 0, 1, 3, 12, 0, -2, 0, 0, 4, -5, 9, 11, 7, -7, 11, -1, -1], [17, -8, 13, 0, 0, 3, 0, -11, 9, 2, 0, -2, 0, -2, -2, 0, -5, 5], [0, 0, -3, -8, 8, 0, -8, 0, 0, 2, 4, -2, -6, 4, -4, -2, 3, 3], [8, 3, 0, 0, 0, -5, 0, 9, 3, -7, 0, 7, 0, 1, 1, 0, 0, 0], [-8, 10, -9, 0, 0, -2, 0, 10, -2, -6, 0, 6, 0, 4, 4, 0, -2, 2], [4, 0, -12, 0, 0, -2, 0, -2, 12, -2, 0, 2, 0, 0, 0, 0, -4, 4], [0, -13, -1, 0, 0, -1, 0, -15, 4, 6, 0, -6, 0, -1, -1, 0, -6, 6], [-6, 2, 0, 0, 0, 2, 0, -6, -4, 2, 0, -2, 0, 6, 6, 0, 2, -2], [0, 0, -3, -13, 13, 0, -6, 0, 0, 2, 5, -3, -5, 0, 0, -2, 3, 3], [-6, 22, -11, 0, 0, -8, 0, 18, -10, -6, 0, 6, 0, 4, 4, 0, 3, -3], [0, 0, 6, 0, 2, 0, 9, 0, 0, 0, 3, -3, -1, -2, 2, 0, -6, -6], [-5, -2, -9, 0, 0, -2, 0, 11, 0, 0, 0, 0, 0, 6, 6, 0, -2, 2], [0, 0, 4, -8, -16, 0, 8, 0, 0, 2, 12, -10, -8, -2, 2, -2, -4, -4], [-7, 12, -7, 0, 0, -1, 0, 17, -1, -3, 0, 3, 0, 2, 2, 0, 1, -1], [0, 0, 3, 4, -2, 0, 4, 0, 0, -5, -10, 5, 2, 0, 0, 0, -3, -3], [0, 0, -5, 5, -3, 0, -7, 0, 0, -2, -7, 5, 5, 5, -5, 5, 5, 5], [14, -2, 7, 0, 0, 8, 0, -2, 4, -7, 0, 7, 0, 3, 3, 0, 1, -1], [0, 0, 2, -2, 8, 0, 1, 0, 0, 1, -2, 3, -8, -4, 4, -3, -2, -2], [-7, 1, -5, 0, 0, 8, 0, 11, -10, -3, 0, 3, 0, 2, 2, 0, 4, -4], [25, -8, 9, 0, 0, 1, 0, -18, 7, 1, 0, -1, 0, -6, -6, 0, -7, 7], [0, 0, 3, 5, 9, 0, 6, 0, 0, -1, 9, -10, 14, -2, 2, -2, -3, -3], [8, -15, 2, 0, 0, 3, 0, -21, 16, 5, 0, -5, 0, -2, -2, 0, -9, 9], [2, -13, 9, 0, 0, 13, 0, -4, 5, 5, 0, -5, 0, -7, -7, 0, -2, 2], [0, 0, -3, 9, 14, 0, 2, 0, 0, -4, 2, -6, 2, -3, 3, -8, 3, 3], [-16, -1, -14, 0, 0, -7, 0, 17, 2, 1, 0, -1, 0, 5, 5, 0, 1, -1], [0, 0, -5, -18, -4, 0, 0, 0, 0, 3, 8, -5, -15, -6, 6, -10, 5, 5], [0, 0, 4, -2, 6, 0, 2, 0, 0, 1, 2, -1, 14, -2, 2, 0, -4, -4], [0, 0, 2, -9, -3, 0, 2, 0, 0, 6, -1, 7, -10, -1, 1, 0, -2, -2], [0, 16, -3, 0, 0, -4, 0, 12, 0, -8, 0, 8, 0, -4, -4, 0, 6, -6], [-27, 21, -21, 0, 0, -2, 0, 35, -14, -9, 0, 9, 0, 12, 12, 0, 4, -4], [0, 0, 6, -18, 1, 0, 4, 0, 0, 16, 21, -5, 0, -4, 4, 3, -6, -6], [0, 0, -1, -13, 2, 0, -2, 0, 0, 6, 2, 4, 0, 2, -2, -1, 1, 1], [0, 0, -8, -15, -6, 0, -13, 0, 0, -1, -6, 5, -16, 3, -3, -9, 8, 8], [-4, 2, -3, 0, 0, -14, 0, 4, -8, 3, 0, -3, 0, 5, 5, 0, -7, 7], [-6, 14, -11, 0, 0, -1, 0, 13, -10, -5, 0, 5, 0, 4, 4, 0, 5, -5], [0, 0, -1, 0, -6, 0, -1, 0, 0, 4, 0, 4, 2, -5, 5, -1, 1, 1], [0, 0, 4, 10, -4, 0, -2, 0, 0, -7, -4, -3, 2, 5, -5, 4, -4, -4], [0, 0, -1, -1, -9, 0, -12, 0, 0, 0, -1, 1, 7, 8, -8, 8, 1, 1], [32, -28, 20, 0, 0, 12, 0, -38, 16, 8, 0, -8, 0, -8, -8, 0, -10, 10], [-4, -8, -3, 0, 0, -6, 0, -8, 4, 4, 0, -4, 0, 3, 3, 0, -5, 5], [4, 2, 7, 0, 0, 3, 0, -13, 8, 7, 0, -7, 0, -2, -2, 0, -3, 3], [0, 0, 3, -2, 15, 0, 14, 0, 0, 10, 25, -15, 2, -3, 3, -13, -3, -3], [0, 0, -1, -6, 16, 0, 4, 0, 0, 8, 18, -10, -12, -6, 6, -10, 1, 1], [0, 0, -2, 8, 2, 0, -2, 0, 0, 0, -4, 4, 6, -2, 2, 14, 2, 2], [13, 17, 9, 0, 0, -8, 0, 19, -12, -9, 0, 9, 0, 4, 4, 0, 4, -4], [-23, 10, -4, 0, 0, -11, 0, 15, -7, -2, 0, 2, 0, 1, 1, 0, 0, 0], [0, 0, 3, -19, 7, 0, 14, 0, 0, 10, 15, -5, -9, -8, 8, -10, -3, -3], [0, 0, 0, 18, -2, 0, -10, 0, 0, -3, -18, 15, 8, 8, -8, 10, 0, 0], [0, 0, 5, 14, 13, 0, -1, 0, 0, 3, -7, 10, 18, 1, -1, 4, -5, -5], [-1, 17, 4, 0, 0, 1, 0, 10, 0, -9, 0, 9, 0, -4, -4, 0, 6, -6], [-1, -9, 12, 0, 0, 6, 0, -29, 2, 3, 0, -3, 0, -2, -2, 0, 2, -2], [1, -5, 5, 0, 0, 6, 0, -7, 2, 3, 0, -3, 0, -10, -10, 0, 3, -3], [-18, -2, -3, 0, 0, -10, 0, 10, 0, 3, 0, -3, 0, 6, 6, 0, -3, 3], [0, 0, -1, 2, -12, 0, 3, 0, 0, 4, 10, -6, -6, -6, 6, 1, 1, 1], [0, 0, 3, -20, -6, 0, 12, 0, 0, 10, 20, -10, -22, -10, 10, -12, -3, -3], [-3, 17, -3, 0, 0, -2, 0, 7, -6, -1, 0, 1, 0, 4, 4, 0, 2, -2], [0, 0, -3, -1, 5, 0, -12, 0, 0, 7, -3, 10, -8, 4, -4, -4, 3, 3], [-10, 2, -15, 0, 0, -12, 0, 2, -6, 3, 0, -3, 0, 8, 8, 0, -5, 5], [0, 0, 3, -14, -18, 0, 12, 0, 0, 6, 20, -14, -20, -7, 7, -10, -3, -3], [11, -9, 16, 0, 0, -4, 0, -29, 5, 6, 0, -6, 0, 1, 1, 0, -11, 11], [28, -17, 16, 0, 0, 5, 0, -21, 11, -1, 0, 1, 0, -11, -11, 0, -6, 6], [0, 0, -11, -6, -14, 0, -14, 0, 0, -7, -12, 5, -12, 5, -5, 0, 11, 11], [0, 0, -5, 27, 16, 0, 1, 0, 0, -5, -14, 9, 10, -1, 1, -5, 5, 5], [0, 0, 4, 8, 8, 0, 8, 0, 0, -4, -6, 2, 12, 0, 0, 4, -4, -4], [2, 10, -11, 0, 0, -5, 0, 25, -14, -5, 0, 5, 0, 8, 8, 0, 7, -7], [-13, -4, -1, 0, 0, 3, 0, -6, 3, 1, 0, -1, 0, -4, -4, 0, -1, 1], [1, -2, 2, 0, 0, 7, 0, -1, -1, -5, 0, 5, 0, -4, -4, 0, -2, 2], [0, 0, 2, 8, 2, 0, 8, 0, 0, -5, -4, -1, 4, -8, 8, 0, -2, -2], [0, 0, 6, -2, -15, 0, -2, 0, 0, -2, 2, -4, 0, 6, -6, 13, -6, -6], [-32, 13, 3, 0, 0, -1, 0, 13, -10, -2, 0, 2, 0, 0, 0, 0, 10, -10], [4, 16, -14, 0, 0, -12, 0, 18, 0, 0, 0, 0, 0, 1, 1, 0, 2, -2], [0, 0, -5, -10, 6, 0, 6, 0, 0, 8, 16, -8, -10, -2, 2, -12, 5, 5], [0, 0, 16, -23, -10, 0, 1, 0, 0, 7, 10, -3, 8, -1, 1, 5, -16, -16], [-9, -7, 5, 0, 0, -10, 0, 1, 0, 11, 0, -11, 0, 4, 4, 0, -2, 2], [0, 0, -7, 9, 16, 0, 4, 0, 0, -2, -5, 3, 3, -7, 7, -7, 7, 7], [0, 0, -1, 2, -6, 0, 8, 0, 0, 4, 16, -12, -18, -8, 8, -4, 1, 1], [9, -16, 0, 0, 0, 3, 0, -14, 3, 9, 0, -9, 0, -2, -2, 0, -4, 4], [0, 0, -1, -13, 6, 0, 1, 0, 0, 9, 20, -11, -6, -1, 1, 5, 1, 1], [0, 0, 4, -25, -9, 0, -6, 0, 0, 9, 9, 0, 4, -7, 7, 2, -4, -4], [0, 0, 3, -6, -16, 0, 10, 0, 0, -1, 8, -9, -5, -4, 4, -14, -3, -3], [14, -10, 12, 0, 0, -4, 0, -6, -4, 5, 0, -5, 0, -1, -1, 0, -6, 6], [-8, -4, 6, 0, 0, 4, 0, -10, -8, 13, 0, -13, 0, -3, -3, 0, -2, 2], [6, 9, -3, 0, 0, -14, 0, -9, 5, -2, 0, 2, 0, -1, -1, 0, 1, -1], [0, 0, 0, -6, -19, 0, -8, 0, 0, -4, -17, 13, 16, 4, -4, 13, 0, 0], [5, -5, -11, 0, 0, 2, 0, 7, 4, -2, 0, 2, 0, 5, 5, 0, 1, -1], [0, 0, 1, 3, -10, 0, 6, 0, 0, 0, 2, -2, -4, -10, 10, 7, -1, -1], [0, 0, -10, 16, 9, 0, 2, 0, 0, -2, -15, 13, 8, 4, -4, 1, 10, 10], [0, 0, -1, -18, -8, 0, 0, 0, 0, -3, 8, -11, -12, -8, 8, -12, 1, 1], [-23, -3, -20, 0, 0, 3, 0, 12, 0, -1, 0, 1, 0, -4, -4, 0, 0, 0], [0, 0, -6, -2, 3, 0, -14, 0, 0, -6, -17, 11, 2, 0, 0, 9, 6, 6], [0, 0, -2, 17, 12, 0, -4, 0, 0, 4, 3, 1, 13, 3, -3, 13, 2, 2], [14, -20, 11, 0, 0, -2, 0, -24, 2, 5, 0, -5, 0, 1, 1, 0, -5, 5], [0, 0, -8, 0, 12, 0, -10, 0, 0, 5, -4, 9, 0, 3, -3, -14, 8, 8], [8, 1, 9, 0, 0, 4, 0, -7, 7, -4, 0, 4, 0, 5, 5, 0, 5, -5], [0, 0, -10, 4, -16, 0, -12, 0, 0, -2, -10, 8, 6, 2, -2, 2, 10, 10], [21, -31, 9, 0, 0, 6, 0, -35, 14, 15, 0, -15, 0, -6, -6, 0, -2, 2], [7, 5, 11, 0, 0, 10, 0, -3, 0, -8, 0, 8, 0, -3, -3, 0, -3, 3], [-12, 20, -10, 0, 0, -6, 0, 14, -18, -3, 0, 3, 0, 3, 3, 0, 8, -8], [0, 0, -8, -3, -16, 0, -9, 0, 0, 1, -4, 5, -12, -7, 7, -3, 8, 8], [10, 6, -11, 0, 0, 2, 0, 0, 14, -7, 0, 7, 0, 0, 0, 0, -1, 1], [-9, 10, -7, 0, 0, -5, 0, 8, 0, -3, 0, 3, 0, 0, 0, 0, 11, -11], [-8, 10, -6, 0, 0, -8, 0, 12, 0, 0, 0, 0, 0, 8, 8, 0, -4, 4], [15, 8, 4, 0, 0, -7, 0, -5, 1, -10, 0, 10, 0, 0, 0, 0, -6, 6], [0, 0, -2, 22, 10, 0, 0, 0, 0, -11, -20, 9, 14, -3, 3, -2, 2, 2], [3, 0, 15, 0, 0, 7, 0, -11, -7, 1, 0, -1, 0, -1, -1, 0, 1, -1], [0, 0, -4, 11, -11, 0, 4, 0, 0, -3, -1, -2, -2, 0, 0, -4, 4, 4], [5, -25, 22, 0, 0, 7, 0, -34, 12, 7, 0, -7, 0, -8, -8, 0, -8, 8], [0, 0, 5, -6, -8, 0, -4, 0, 0, -4, 10, -14, -14, 2, -2, -8, -5, -5], [0, 0, 10, -19, -6, 0, 13, 0, 0, 5, 10, -5, -10, 3, -3, 9, -10, -10], [0, 0, -1, -15, -2, 0, -2, 0, 0, -3, 1, -4, -3, 2, -2, -7, 1, 1], [9, -11, -7, 0, 0, 0, 0, 7, 12, 3, 0, -3, 0, -2, -2, 0, -3, 3], [0, 0, -4, 24, 4, 0, -2, 0, 0, -3, 2, -5, -4, 0, 0, -8, 4, 4], [0, 0, 9, -10, -10, 0, 4, 0, 0, 5, 10, -5, -11, 0, 0, 0, -9, -9], [-21, 9, -10, 0, 0, -2, 0, 29, -7, -4, 0, 4, 0, 3, 3, 0, 5, -5], [-6, 6, 5, 0, 0, 4, 0, -4, 8, -1, 0, 1, 0, 1, 1, 0, 3, -3], [0, 0, 6, 18, 15, 0, 8, 0, 0, -2, -7, 5, 4, 4, -4, 5, -6, -6], [0, 0, 5, 16, -3, 0, -5, 0, 0, -7, -3, -4, -2, 6, -6, 9, -5, -5], [7, 5, -2, 0, 0, 5, 0, 2, -2, -1, 0, 1, 0, 4, 4, 0, 8, -8], [30, -33, 18, 0, 0, 3, 0, -39, 10, 13, 0, -13, 0, -3, -3, 0, -7, 7], [0, 0, 7, -1, -3, 0, 6, 0, 0, -1, 3, -4, -15, 1, -1, 0, -7, -7], [0, 0, -10, 8, 11, 0, 0, 0, 0, 0, 1, -1, -2, -4, 4, -17, 10, 10], [-14, 7, -24, 0, 0, -3, 0, 1, 5, -5, 0, 5, 0, -5, -5, 0, -2, 2], [0, 0, -10, 4, -16, 0, -20, 0, 0, -6, -18, 12, -14, -3, 3, -6, 10, 10], [0, 0, -6, 0, -3, 0, -2, 0, 0, -2, -7, 5, -14, -8, 8, 7, 6, 6], [0, 0, -2, -3, 2, 0, 10, 0, 0, 5, 5, 0, 7, -3, 3, -7, 2, 2], [-33, 22, -25, 0, 0, 5, 0, 35, -19, -6, 0, 6, 0, 7, 7, 0, 17, -17], [-14, 24, -4, 0, 0, -6, 0, 18, -12, -13, 0, 13, 0, 1, 1, 0, 10, -10], [0, 0, 3, -12, -12, 0, 14, 0, 0, 3, 16, -13, -10, -5, 5, -22, -3, -3], [38, -11, 8, 0, 0, -3, 0, -15, 15, -5, 0, 5, 0, -5, -5, 0, -8, 8], [9, 12, -3, 0, 0, -7, 0, -6, 7, -9, 0, 9, 0, -6, -6, 0, 1, -1], [0, 0, -5, 18, 10, 0, -14, 0, 0, -9, -22, 13, 24, 12, -12, 20, 5, 5], [16, -22, 5, 0, 0, -2, 0, -32, 26, 10, 0, -10, 0, -3, -3, 0, -17, 17], [0, 0, -5, 5, -22, 0, -8, 0, 0, -10, -22, 12, -10, 1, -1, 10, 5, 5], [-5, 2, 5, 0, 0, 1, 0, -22, 8, 3, 0, -3, 0, 2, 2, 0, 1, -1], [-1, 2, 21, 0, 0, 17, 0, 4, -1, -1, 0, 1, 0, -14, -14, 0, 11, -11], [0, 0, 12, 27, -2, 0, -1, 0, 0, -3, -10, 7, 28, 5, -5, 17, -12, -12], [-11, 3, -4, 0, 0, -2, 0, 25, -8, 1, 0, -1, 0, 3, 3, 0, 8, -8], [0, 0, 5, 1, 6, 0, 6, 0, 0, 3, -9, 12, 9, 8, -8, 9, -5, -5], [0, 0, -3, -1, -6, 0, -4, 0, 0, 6, 6, 0, -2, 1, -1, 10, 3, 3], [36, -24, 22, 0, 0, 16, 0, -38, 4, 13, 0, -13, 0, -4, -4, 0, 0, 0], [9, 9, -8, 0, 0, -2, 0, 9, 6, -8, 0, 8, 0, 1, 1, 0, -8, 8], [0, 0, -9, -7, -6, 0, 4, 0, 0, 1, 9, -8, -25, 3, -3, -3, 9, 9], [9, 1, 10, 0, 0, 10, 0, 1, 6, -2, 0, 2, 0, -3, -3, 0, 12, -12], [0, 0, 10, -4, 0, 0, 17, 0, 0, 8, 16, -8, -6, -4, 4, 1, -10, -10], [0, 0, 1, -4, 0, 0, -6, 0, 0, 8, -14, 22, 12, 0, 0, 18, -1, -1], [28, -7, 20, 0, 0, -11, 0, -33, -4, 4, 0, -4, 0, -6, -6, 0, -7, 7], [-22, 16, -13, 0, 0, -8, 0, 28, -12, 3, 0, -3, 0, 3, 3, 0, -3, 3], [-10, 19, -5, 0, 0, -5, 0, 26, -7, -5, 0, 5, 0, 5, 5, 0, 2, -2], [0, 0, 22, -28, -14, 0, 17, 0, 0, 6, 10, -4, 12, -5, 5, -3, -22, -22], [0, 0, 0, -10, 10, 0, -15, 0, 0, 9, 0, 9, 0, 16, -16, 13, 0, 0], [-10, 15, -5, 0, 0, -11, 0, 31, -12, -5, 0, 5, 0, 8, 8, 0, 8, -8], [0, 0, -4, -2, -8, 0, 0, 0, 0, -6, -12, 6, -10, 4, -4, 8, 4, 4], [-6, -8, 9, 0, 0, 12, 0, -24, -2, 12, 0, -12, 0, -1, -1, 0, 3, -3], [0, 0, 5, -15, -4, 0, 14, 0, 0, -2, 19, -21, 13, -5, 5, 1, -5, -5], [9, 19, 9, 0, 0, -6, 0, 21, -4, -7, 0, 7, 0, 2, 2, 0, 12, -12], [0, 0, 5, -6, -4, 0, -14, 0, 0, 2, -2, 4, -4, -1, 1, -6, -5, -5], [-9, -1, -15, 0, 0, 0, 0, 37, 2, -7, 0, 7, 0, -2, -2, 0, 6, -6], [-22, 12, -26, 0, 0, -22, 0, 32, -8, -6, 0, 6, 0, 12, 12, 0, -6, 6], [-1, 12, -1, 0, 0, -6, 0, 7, -6, -4, 0, 4, 0, 4, 4, 0, 2, -2], [0, 0, 13, -5, 16, 0, 19, 0, 0, 11, 22, -11, 16, -3, 3, -5, -13, -13], [0, 0, 3, 20, 16, 0, -5, 0, 0, -4, -2, -2, 30, 12, -12, 9, -3, -3], [-4, -33, 11, 0, 0, 13, 0, -32, 11, 11, 0, -11, 0, -11, -11, 0, 2, -2], [0, 0, -5, -24, -12, 0, -6, 0, 0, 9, 8, 1, -20, -2, 2, -12, 5, 5], [25, -19, 38, 0, 0, 5, 0, -42, 8, 3, 0, -3, 0, -12, -12, 0, -14, 14], [28, -26, 8, 0, 0, -2, 0, -20, 14, 15, 0, -15, 0, -5, -5, 0, -14, 14], [0, 0, -18, 14, 8, 0, -13, 0, 0, -7, -26, 19, 14, 8, -8, -5, 18, 18], [47, -27, 34, 0, 0, 1, 0, -46, 22, 13, 0, -13, 0, -8, -8, 0, -14, 14], [0, 0, 3, -37, -9, 0, 0, 0, 0, -1, 3, -4, -36, -7, 7, -10, -3, -3], [-3, -8, 10, 0, 0, 5, 0, -23, -9, 4, 0, -4, 0, 9, 9, 0, 2, -2], [0, 0, -4, 16, 8, 0, 4, 0, 0, 8, -2, 10, -2, 2, -2, 2, 4, 4], [6, -24, 3, 0, 0, -4, 0, -8, 12, 12, 0, -12, 0, -8, -8, 0, -9, 9], [0, 0, 6, -9, -11, 0, -12, 0, 0, 0, 9, -9, 14, 4, -4, -2, -6, -6], [-4, 16, -20, 0, 0, 4, 0, 10, -6, -2, 0, 2, 0, 4, 4, 0, 0, 0], [-11, 19, -9, 0, 0, -10, 0, 13, -16, -5, 0, 5, 0, 2, 2, 0, -2, 2], [0, 0, -2, 15, -4, 0, -2, 0, 0, 4, 1, 3, -7, -6, 6, 3, 2, 2], [0, 0, 6, -24, -6, 0, -10, 0, 0, 0, -4, 4, -24, 1, -1, 8, -6, -6], [3, 3, -25, 0, 0, 0, 0, 23, 0, -2, 0, 2, 0, 3, 3, 0, 8, -8], [0, 0, 1, 21, 5, 0, -16, 0, 0, -15, -23, 8, 18, 5, -5, 14, -1, -1], [2, -11, 11, 0, 0, -3, 0, -34, -5, 15, 0, -15, 0, -7, -7, 0, -8, 8], [0, 0, -3, -6, -8, 0, -6, 0, 0, 4, 6, -2, 14, 0, 0, -4, 3, 3], [48, -22, 32, 0, 0, 18, 0, -48, 12, 0, 0, 0, 0, -14, -14, 0, -6, 6], [-6, 1, 8, 0, 0, -5, 0, -3, -6, 3, 0, -3, 0, 5, 5, 0, -1, 1], [0, 0, 3, 25, -16, 0, 4, 0, 0, -11, -17, 6, 1, 1, -1, 3, -3, -3], [0, 0, -14, 16, 26, 0, -12, 0, 0, -3, -26, 23, 8, 9, -9, -6, 14, 14], [0, 0, 5, 15, 3, 0, 8, 0, 0, 0, -11, 11, 7, 4, -4, 20, -5, -5], [0, 0, 8, 14, -14, 0, 18, 0, 0, -11, 4, -15, 24, 0, 0, -6, -8, -8], [0, 0, -17, 23, 26, 0, 0, 0, 0, -4, -10, 6, 2, -1, 1, -18, 17, 17], [-1, 22, 3, 0, 0, -7, 0, 13, 3, -13, 0, 13, 0, 1, 1, 0, -5, 5], [0, 0, 11, -32, -22, 0, 10, 0, 0, -5, 8, -13, 2, -12, 12, -2, -11, -11], [0, 0, 10, 7, -2, 0, 9, 0, 0, 1, 16, -15, 0, -9, 9, 9, -10, -10], [23, -14, 15, 0, 0, 21, 0, -10, 3, -5, 0, 5, 0, -6, -6, 0, 9, -9], [-4, 7, 29, 0, 0, 5, 0, 1, -12, -9, 0, 9, 0, 7, 7, 0, 4, -4], [9, -9, 2, 0, 0, 16, 0, -1, -8, 10, 0, -10, 0, -3, -3, 0, -2, 2], [0, 0, 13, -13, 3, 0, 12, 0, 0, 5, 5, 0, -1, 3, -3, 10, -13, -13], [0, 0, -3, -8, -12, 0, -4, 0, 0, 2, 0, 2, 2, -6, 6, -12, 3, 3], [-25, 1, -28, 0, 0, -24, 0, 31, -6, 8, 0, -8, 0, 10, 10, 0, 0, 0], [0, 0, 11, 7, -8, 0, -12, 0, 0, -4, -20, 16, 40, 4, -4, 17, -11, -11], [0, 0, 16, -10, -21, 0, 4, 0, 0, 6, 19, -13, 6, 0, 0, -13, -16, -16], [-4, 36, -17, 0, 0, -24, 0, 28, -12, -15, 0, 15, 0, 13, 13, 0, 13, -13], [0, 0, -12, 4, 7, 0, 12, 0, 0, -6, -3, -3, 4, -12, 12, -3, 12, 12], [0, 0, 2, 9, 20, 0, 2, 0, 0, -8, -5, -3, 23, -2, 2, -7, -2, -2], [0, 0, -7, 11, 20, 0, 2, 0, 0, -12, -8, -4, -6, 2, -2, -3, 7, 7], [-16, 22, 7, 0, 0, 6, 0, 14, 0, -5, 0, 5, 0, 0, 0, 0, 13, -13], [39, -38, 38, 0, 0, 17, 0, -54, 27, 3, 0, -3, 0, -16, -16, 0, -18, 18], [13, 1, -15, 0, 0, -4, 0, 15, 4, -5, 0, 5, 0, 2, 2, 0, 8, -8], [0, 0, 5, 9, -12, 0, 4, 0, 0, -8, -11, 3, 11, -2, 2, -7, -5, -5], [12, -16, 24, 0, 0, -10, 0, -2, -12, 7, 0, -7, 0, -1, -1, 0, -2, 2], [0, 0, 12, -1, 31, 0, -2, 0, 0, 7, -3, 10, 12, 1, -1, 2, -12, -12], [-1, -22, 13, 0, 0, 11, 0, -17, -13, 9, 0, -9, 0, 3, 3, 0, -1, 1], [0, 0, -5, -19, -40, 0, -2, 0, 0, -6, -4, -2, -20, 5, -5, -4, 5, 5], [-2, -4, 19, 0, 0, 4, 0, -24, -4, -3, 0, 3, 0, 0, 0, 0, -9, 9], [0, 0, -12, -2, -7, 0, 0, 0, 0, 2, -3, 5, 4, -12, 12, -13, 12, 12], [0, 0, -6, -26, -24, 0, -6, 0, 0, -4, 8, -12, -22, -3, 3, -8, 6, 6], [16, 16, 29, 0, 0, 8, 0, -8, 2, -6, 0, 6, 0, -1, -1, 0, 13, -13], [34, -17, 19, 0, 0, 5, 0, -14, 5, 9, 0, -9, 0, -11, -11, 0, 4, -4], [-8, 5, -11, 0, 0, -11, 0, 39, -6, -6, 0, 6, 0, 3, 3, 0, -2, 2], [0, 0, 3, -1, -8, 0, -7, 0, 0, -5, -2, -3, 2, 11, -11, 7, -3, -3], [0, 0, 0, 10, 16, 0, 10, 0, 0, 8, 18, -10, 8, -2, 2, -4, 0, 0], [27, -17, -13, 0, 0, -2, 0, -33, 16, 7, 0, -7, 0, -6, -6, 0, -14, 14], [0, 0, -2, 0, -30, 0, -24, 0, 0, -6, -18, 12, -4, 7, -7, 30, 2, 2], [5, -6, 11, 0, 0, -7, 0, -9, 3, 4, 0, -4, 0, 0, 0, 0, 3, -3], [-34, 14, 3, 0, 0, 8, 0, 22, -18, 2, 0, -2, 0, 3, 3, 0, 21, -21], [0, 0, 10, 18, -4, 0, -12, 0, 0, -5, -20, 15, 28, 11, -11, 6, -10, -10], [3, 19, -29, 0, 0, 14, 0, 17, 0, -13, 0, 13, 0, 8, 8, 0, 6, -6], [0, 0, 3, -31, 0, 0, 18, 0, 0, 12, 32, -20, -22, -7, 7, 2, -3, -3], [0, 0, 12, 11, 14, 0, 21, 0, 0, 5, 28, -23, 10, -11, 11, -7, -12, -12], [0, 0, 15, -4, 4, 0, 28, 0, 0, 1, 16, -15, 12, -10, 10, -2, -15, -15], [20, -6, -23, 0, 0, -6, 0, -4, 30, 2, 0, -2, 0, -15, -15, 0, -13, 13]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_1690_b_Hecke( : Kf := Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_1690_2_b_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_1690_2_b_g(:prec:=18)
    chi := MakeCharacter_1690_b();
    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_1690_2_b_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_1690_2_b_g( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1690_b();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![1, 0, 238, 0, 3451, 0, 12143, 0, 16443, 0, 10052, 0, 3044, 0, 469, 0, 35, 0, 1]>,<11,R![-1688, 3900, 2084, -3185, -938, 672, 126, -45, -4, 1]>],Snew);
    return Vf;
end function;