
// Make newform 35.6.e.a in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_35_e();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_35_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_35_6_e_a();".
// 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_35_6_e_a();".
// 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 := [313600, -1794240, 9029136, -7120352, 5067668, -608504, 240269, -3257, 9714, 27, 110, -1, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [21547821407039195027925760, 1899336597051364106720, -9848865216344630186408, 172488893418565320606489, -13733163183321376193458, 7210253086068556811390, -844940438036854392342, 267470564024133907693, -7866915029237918170, 3228942815539669144, -133725817906773464, 28230181680367687], [-118374181391324226242000, -1155929670352927198960, 5099431532023610873044, 305322749531891334677403, -17380902067880561667271, 15806745328634071405235, 700495386575182055196, 649253412456411874696, 12218724065108421680, 7197281425360947613, 28230181680367687, 66388882378066849], [10854805651234298860308160, -54613049204049911387937424, 38118195151269240531420592, -30328081641557240551657524, 3422151405014628172065320, -1462312323568472326910641, 9282593808429195967629, -58863193362354159936410, -278222977171374861223, -664796578470440213942, 4977276932528697061, -6039499050577766645], [107410033366125948920869120, -1048147295193847137434320, 4708257231455631913367548, 214860347241695946183782106, -13334354917553499228708277, 12429499745875403113244285, 622066563111152923675782, 512180378623485246907117, 10379043110318982599270, 5693107512848974435651, 30607787177058670459, 52322101745624380228], [-268110604843501017027082240, 1350502024155491915228513536, -1546932437238343332569148616, 794420238005862000834919680, -120088673516912456214643388, 34645031716165556521494679, -1659244044540004057540923, 1440818444881405886231798, -8819865760350601583663, 16513889933321721359462, -270100722912524149903, 151076034291374185547], [107743678670267150252505440, -97167571241683005764960, 412482034194436777839944, 31400176434228223257936348, -1926490887512260700141126, 1693912209577006520603770, 63758324818681303471356, 69260803279607131194011, 1161485286890362349770, 772990456491140565773, 1411801999708260032, 7091894478336914729], [73522585881312782070480176, -298502823994606888776560, 1328428462363840694290484, 68158744233247905816711078, -4155449062191167306088143, 3820655373495828539523319, 179372545053722983092954, 157157152306574834673947, 3059198080549517329546, 1746180598725624158405, 7977603534081794105, 16063048464078134816], [98166747586673986647741440, -493896182093230194401033216, 345426721610757473957685392, -274174025772142730303627328, 30868886253403175795256964, -13224037893430787227816709, 80741362729562035487877, -532365753911013086926474, -2552881690802807437727, -6011958331935405715930, 44682571666036802801, -54621046984712167201], [249753470635519944424976960, -1257218836543510135952592944, 1148800577474268071998274336, -716539518823875975101698236, 93437579537306714970742864, -33179340034742427577681121, 804616953571597380973005, -1348948846630186060003354, 149384528847355829017, -15334702064029637541934, 175345975795757180573, -139478356307493384181], [1740925601580401309248804160, -8760165758735224833443687024, 6713400393754856774999004416, -4897614943386828431458750476, 575145419155729177351723384, -233861202257717465115639581, 2545918467646447090830315, -9430977795125532582265174, -33047141121934547844173, -106691226944671427981434, 907065566243025426803, -969388706845078941841]];
    Rf_basisdens := [1, 1, 595840743865600904598060, 595840743865600904598060, 9533451901849614473568960, 14300177852774421710353440, 28600355705548843420706880, 1021441275198172979310960, 1430017785277442171035344, 2383362975462403618392240, 4085765100792691917243840, 14300177852774421710353440];
    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_35_e();"
function MakeCharacter_35_e()
    N := 35;
    order := 3;
    char_gens := [22, 31];
    v := [3, 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_35_e_Hecke();"
function MakeCharacter_35_e_Hecke(Kf)
    N := 35;
    order := 3;
    char_gens := [22, 31];
    char_values := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, 0, 0, 1, 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 := 6;
    raw_aps := [[1, -1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 1, -3, 0, 1, 0, 0, 0, 0, 0], [25, 0, 0, 0, -25, 0, 0, 0, 0, 0, 0, 0], [3, 7, 0, 7, -9, -1, -3, 0, 3, 0, -2, 0], [0, -32, 0, -32, 151, 0, 9, 0, 0, -4, -1, -4], [-29, 0, 0, -4, 0, -7, 0, 10, -3, 0, 0, 0], [0, 2, 0, 2, -256, 0, -34, 0, 0, 20, 4, 0], [-67, 230, -8, 0, 67, 43, 43, 8, -3, 8, 3, -8], [646, -49, -60, 0, -646, -34, -34, 20, -53, 60, 53, -20], [240, 0, -112, 264, 0, -147, 0, 38, -103, 0, 0, 0], [0, 434, 0, 434, 1206, 0, -148, 0, 0, -12, -18, 68], [2445, -14, 220, 0, -2445, 9, 9, -10, -25, -220, 25, 10], [607, 0, -168, -44, 0, -198, 0, 112, -62, 0, 0, 0], [-3909, 0, 40, 871, 0, 193, 0, -120, 112, 0, 0, 0], [-7483, 1402, -120, 0, 7483, -59, -59, 80, 135, 120, -135, -80], [0, -1068, 0, -1068, 135, 0, -567, 0, 0, 240, 155, 110], [0, 968, 0, 968, 10892, 0, 342, 0, 0, -476, -598, 68], [-11694, -2444, -112, 0, 11694, -727, -727, -22, -443, 112, 443, 22], [0, -239, 0, -239, 23351, 0, -1901, 0, 0, -460, 234, -260], [-26588, 0, -396, -3068, 0, 1874, 0, -116, -114, 0, 0, 0], [0, -34, 0, -34, 882, 0, 276, 0, 0, 500, 1010, 20], [37458, -2576, -1116, 0, -37458, -820, -820, -380, 60, 1116, -60, 380], [31123, 0, 1420, 1645, 0, -1275, 0, -540, 222, 0, 0, 0], [-6542, -6634, 140, 0, 6542, 3531, 3531, 186, 429, -140, -429, -186], [-12738, 0, -1480, 2152, 0, -464, 0, 120, 1744, 0, 0, 0], [0, -12580, 0, -12580, 49346, 0, -2475, 0, 0, -600, -85, 170], [-8309, 8211, -2100, 0, 8309, 2791, 2791, 140, 852, 2100, -852, -140], [391, -5161, 3300, 0, -391, -2335, -2335, 220, 1470, -3300, -1470, -220], [0, 13128, 0, 13128, 47602, 0, -1023, 0, 0, -136, 2447, 518], [-802, 0, -60, -6970, 0, -2450, 0, -1360, 852, 0, 0, 0], [-83891, 0, 1760, 1286, 0, -5587, 0, 720, 839, 0, 0, 0], [42821, 10750, 540, 0, -42821, -8955, -8955, 500, -505, -540, 505, -500], [0, -19224, 0, -19224, 8676, 0, -11056, 0, 0, 440, 144, 440], [-43350, 0, -528, -46574, 0, 4782, 0, -608, 1288, 0, 0, 0], [-110632, -320, -88, 0, 110632, 2813, 2813, -902, -3, 88, 3, 902], [0, -2130, 0, -2130, -11084, 0, 3610, 0, 0, -7220, -3980, 2060], [0, -5458, 0, -5458, -32181, 0, 12451, 0, 0, -2220, -741, -290], [103772, -18076, -3580, 0, -103772, -6168, -6168, -820, 4232, 3580, -4232, 820], [92460, 0, 1200, -60357, 0, 3824, 0, 640, -1821, 0, 0, 0], [-52135, 24718, 1580, 0, 52135, -5275, -5275, 430, -2193, -1580, 2193, -430], [0, 38052, 0, 38052, 106497, 0, -5371, 0, 0, 1152, -3361, -4064], [-160008, 0, 1160, 24940, 0, 4615, 0, -3030, -545, 0, 0, 0], [-122214, -18954, -5792, 0, 122214, -5642, -5642, 2808, -9128, 5792, 9128, -2808], [0, -16248, 0, -16248, 343120, 0, -582, 0, 0, 680, 3350, -4780], [42545, 0, -9780, 49238, 0, -4501, 0, 5810, -5951, 0, 0, 0], [0, 27616, 0, 27616, -245188, 0, 2896, 0, 0, 3200, -12744, 3184], [-372673, 0, 552, -20694, 0, -18943, 0, -208, -6557, 0, 0, 0], [479804, 0, -8700, 54192, 0, 4156, 0, -5220, 1552, 0, 0, 0], [0, -33024, 0, -33024, -92604, 0, 10444, 0, 0, -9660, 2224, -6820], [252768, -52976, -2576, 0, -252768, -6710, -6710, 3700, 13850, 2576, -13850, -3700], [-231136, -44870, 9180, 0, 231136, 26514, 26514, 8600, -6808, -9180, 6808, -8600], [-87100, 0, -1852, 7514, 0, -27742, 0, -2372, -348, 0, 0, 0], [0, 13766, 0, 13766, -9819, 0, -2747, 0, 0, 9332, 273, 1882], [108607, 0, 3312, 56416, 0, 41677, 0, 6872, 5493, 0, 0, 0], [562992, -126828, 3400, 0, -562992, -27524, -27524, -2720, 1160, -3400, -1160, 2720], [0, -32823, 0, -32823, 616155, 0, -7247, 0, 0, -11420, -6480, 21460], [0, -92700, 0, -92700, 208902, 0, -11707, 0, 0, 10288, -2817, 7742], [519136, 35868, 22964, 0, -519136, 7234, 7234, -5076, 7846, -22964, -7846, 5076], [0, -67114, 0, -67114, 699936, 0, 59394, 0, 0, -700, -316, -12640], [-1175583, 0, -5884, 155118, 0, 4531, 0, -5974, 3489, 0, 0, 0], [0, 57032, 0, 57032, -301770, 0, 76678, 0, 0, -11540, -3690, -5660], [294693, 0, 4380, 26310, 0, -17455, 0, 7670, -3353, 0, 0, 0], [-129, 0, -13020, -12005, 0, -6295, 0, 13420, 7944, 0, 0, 0], [0, -54952, 0, -54952, 401936, 0, 94414, 0, 0, 17356, 26354, 756], [-1010096, 110640, -41360, 0, 1010096, -59776, -59776, -760, 1432, 41360, -1432, 760], [16328, 288730, 1940, 0, -16328, 4562, 4562, -3960, 4520, -1940, -4520, 3960], [392681, 134144, -1688, 0, -392681, -17973, -17973, 15192, -1197, 1688, 1197, -15192], [-1472504, 0, -31540, 5450, 0, 21580, 0, 12380, 2334, 0, 0, 0], [0, -120699, 0, -120699, 162591, 0, 21419, 0, 0, -21180, -11706, -4420], [-150860, 0, -5728, 133256, 0, -17003, 0, 11582, 26553, 0, 0, 0], [0, 6006, 0, 6006, -476298, 0, -64454, 0, 0, -12820, -39140, -16000], [-714372, 7818, -29004, 0, 714372, -99158, -99158, 10132, -17632, 29004, 17632, -10132], [0, 140607, 0, 140607, -299396, 0, 39056, 0, 0, 35660, 24259, 11100], [1632882, 335764, 34240, 0, -1632882, 40862, 40862, -3620, 25362, -34240, -25362, 3620], [-1004025, 0, -14160, 79690, 0, 9505, 0, -12880, 11715, 0, 0, 0], [-968322, -296373, -20860, 0, 968322, 34118, 34118, 6540, -12553, 20860, 12553, -6540], [0, -171240, 0, -171240, 151332, 0, 27238, 0, 0, 5648, -19502, -15148], [1022738, 42140, 67440, 0, -1022738, 50732, 50732, -31240, 34600, -67440, -34600, 31240], [-2704509, 312828, -12616, 0, 2704509, 67274, 67274, 2724, 18926, 12616, -18926, -2724], [0, -70402, 0, -70402, 602202, 0, -143993, 0, 0, -65196, 4507, -6622], [67835, 0, 1836, 331898, 0, 100231, 0, 16716, -56111, 0, 0, 0], [-862688, 0, -35048, -514024, 0, 54797, 0, -20438, 4293, 0, 0, 0], [0, 39482, 0, 39482, 475886, 0, 44826, 0, 0, -99416, 46096, -18776], [-2126898, 0, 34460, 153058, 0, -119266, 0, 17000, -12848, 0, 0, 0], [544278, 217816, -8880, 0, -544278, 13006, 13006, 32216, -21066, 8880, 21066, -32216], [650567, 102679, -66920, 0, -650567, 62777, 62777, -1400, -57918, 66920, 57918, 1400], [1569645, 0, -16736, -263808, 0, 40774, 0, 38664, -56294, 0, 0, 0], [296990, -167044, -9000, 0, -296990, 176854, 176854, 28780, -16750, 9000, 16750, -28780], [298822, 0, 46224, 145192, 0, -241676, 0, 26584, 44156, 0, 0, 0], [1968542, 0, 82520, -76467, 0, 115574, 0, -31240, 109267, 0, 0, 0], [2168349, -171237, 21180, 0, -2168349, 743, 743, -11580, -36640, -21180, 36640, 11580], [0, 65374, 0, 65374, -1983218, 0, -89660, 0, 0, 66396, -16630, -76740], [0, -308100, 0, -308100, 2803768, 0, -157928, 0, 0, 64420, 38664, -20420], [253882, 0, 1988, -97466, 0, 114828, 0, 15908, 141722, 0, 0, 0], [1735938, -361730, 105632, 0, -1735938, -79122, -79122, -45832, 36032, -105632, -36032, 45832], [610019, 0, -81960, -255043, 0, -95649, 0, -47080, 53912, 0, 0, 0], [-983652, -56928, 5808, 0, 983652, 36799, 36799, 63114, 50611, -5808, -50611, -63114], [0, -634950, 0, -634950, -1027869, 0, -41885, 0, 0, -39780, 74935, 60230], [-3664376, -435600, 59100, 0, 3664376, 53064, 53064, -51100, 28652, -59100, -28652, 51100], [2029826, 712376, -26992, 0, -2029826, -50417, -50417, 38298, 27067, 26992, -27067, -38298], [958241, 0, -86700, 531495, 0, -112125, 0, 35260, -23066, 0, 0, 0], [0, -431866, 0, -431866, -5000365, 0, -221105, 0, 0, 55980, 48319, -67090], [0, -140097, 0, -140097, -98757, 0, 112775, 0, 0, 137940, 81620, -42260], [-2476177, -385418, 73068, 0, 2476177, 32969, 32969, -9866, -71949, -73068, 71949, 9866], [0, -148356, 0, -148356, 3729676, 0, 308122, 0, 0, 33028, -71678, -51772], [0, 638980, 0, 638980, 1750748, 0, -205878, 0, 0, -94080, 13994, -25420], [-1492328, 0, 301580, -506768, 0, 236856, 0, 900, -90036, 0, 0, 0], [-316114, 651346, 56460, 0, 316114, 57346, 57346, -3600, -75128, -56460, 75128, 3600], [0, 625436, 0, 625436, 311222, 0, 102606, 0, 0, -158440, -86794, 107624], [-265978, 0, -193288, -182604, 0, -202048, 0, 43112, -126332, 0, 0, 0], [-6360150, 904561, -74180, 0, 6360150, -42106, -42106, -4700, 172065, 74180, -172065, 4700], [0, -210108, 0, -210108, 2191495, 0, 67343, 0, 0, -266600, -266595, 58010], [-4341666, 0, -11000, 477456, 0, -154842, 0, -45100, 27854, 0, 0, 0], [0, 101672, 0, 101672, 2481747, 0, -200831, 0, 0, 184452, -70321, 19356], [-1138438, 0, 55472, -823194, 0, -172678, 0, -19248, -9592, 0, 0, 0], [0, 1440320, 0, 1440320, -6714379, 0, 78550, 0, 0, 41360, 100270, -55120], [-7756670, 0, 14620, -620116, 0, -131158, 0, -35340, 25442, 0, 0, 0], [0, 832287, 0, 832287, 500064, 0, 29916, 0, 0, -121900, -38001, -52740], [-4846551, -530520, -50720, 0, 4846551, 279179, 279179, -5530, 116107, 50720, -116107, 5530], [450900, 0, -220916, -843288, 0, 239314, 0, -716, -218974, 0, 0, 0], [0, -489604, 0, -489604, -879774, 0, 232243, 0, 0, 252512, -63967, -121878], [-4053342, 0, -58040, -240200, 0, 449750, 0, -54180, -230818, 0, 0, 0], [-2916739, -417116, -49000, 0, 2916739, -641185, -641185, -70250, -114045, 49000, 114045, 70250], [0, -185171, 0, -185171, -282809, 0, -111393, 0, 0, 145200, -105130, 7040], [-2710094, -645198, -205224, 0, 2710094, -224094, -224094, -44504, -104216, 205224, 104216, 44504], [-861008, 0, -93072, -1515476, 0, 119093, 0, 133658, -12743, 0, 0, 0], [2487528, -67340, 278232, 0, -2487528, 472323, 472323, -79542, 32067, -278232, -32067, 79542], [-216042, -1087710, 128632, 0, 216042, -490022, -490022, -36072, -46208, -128632, 46208, 36072], [-1166664, 0, -427160, 81715, 0, -309340, 0, -8760, -60121, 0, 0, 0], [1305429, 172090, -146540, 0, -1305429, -426361, -426361, -44870, 108117, 146540, -108117, 44870], [0, 2001376, 0, 2001376, 3271607, 0, 177521, 0, 0, 158300, -95729, -50316], [-7576130, 0, -29560, -1386911, 0, 491262, 0, 114960, 129087, 0, 0, 0], [7855846, 720948, 179304, 0, -7855846, 670674, 670674, 55544, -11914, -179304, 11914, -55544], [2666340, 0, -11500, 20158, 0, 264654, 0, 134800, 120124, 0, 0, 0], [-3070109, 770330, -120220, 0, 3070109, 729245, 729245, 4670, -127325, 120220, 127325, -4670], [-8383145, 0, 285380, -1212850, 0, 249565, 0, -22170, 138475, 0, 0, 0], [0, 1229608, 0, 1229608, 10329763, 0, 503555, 0, 0, -240920, 4885, 142050], [0, 260625, 0, 260625, -7282487, 0, -100763, 0, 0, 274820, 45544, 144620], [7638218, 0, 54600, -1247836, 0, -310238, 0, 25100, 436374, 0, 0, 0], [0, 344720, 0, 344720, -2992483, 0, 452098, 0, 0, -350912, -96842, 135092], [-9062623, 0, -76416, 1686792, 0, 129839, 0, -166856, 212751, 0, 0, 0], [-16319614, -657584, -16752, 0, 16319614, -506432, -506432, 78848, -142848, 16752, 142848, -78848], [0, -1433501, 0, -1433501, -2790799, 0, -62053, 0, 0, -67480, 429340, -37080], [7627029, 0, 380280, -1349319, 0, 340183, 0, -12920, -37336, 0, 0, 0], [0, -229232, 0, -229232, -3451558, 0, 275852, 0, 0, -147056, 308292, -127192], [-8917920, 0, 139392, -2551074, 0, -428608, 0, -21848, -411642, 0, 0, 0], [-7094527, 0, 391440, 1082160, 0, 351085, 0, -93710, 12317, 0, 0, 0], [0, 805900, 0, 805900, -8388722, 0, -36888, 0, 0, 310160, -89196, 27960], [-7121272, 871784, 251024, 0, 7121272, -194640, -194640, -69400, 63320, -251024, -63320, 69400], [-9317568, -2728791, -481920, 0, 9317568, -236088, -236088, 20840, -13393, 481920, 13393, -20840], [3240769, 443928, 155360, 0, -3240769, -588727, -588727, -186150, -68215, -155360, 68215, 186150], [1171677, 0, 185680, 1922640, 0, 337640, 0, 301420, -467580, 0, 0, 0], [2672620, 0, -157740, 568904, 0, 525092, 0, -152740, 378712, 0, 0, 0], [-9144521, -2170297, -10040, 0, 9144521, 287663, 287663, -204120, 237020, 10040, -237020, 204120], [0, -3411241, 0, -3411241, -3049185, 0, 454875, 0, 0, 23600, 89724, 3360], [19806472, 0, -151552, -333026, 0, -182632, 0, -71672, -271698, 0, 0, 0], [5089818, 1030216, -170100, 0, -5089818, 133736, 133736, 174196, -190296, 170100, 190296, -174196], [11556203, -1442060, -403608, 0, -11556203, -566022, -566022, 131488, 11842, 403608, -11842, -131488], [17573170, 0, -482920, -915532, 0, 446014, 0, 79940, -414126, 0, 0, 0], [0, 356344, 0, 356344, -11222924, 0, 1662622, 0, 0, -341392, -110838, -12092], [11860009, 829583, 362660, 0, -11860009, -10557, -10557, -71540, 433600, -362660, -433600, 71540], [645864, 0, 432280, -3272268, 0, 778696, 0, -102600, -38228, 0, 0, 0], [6136425, 0, -98400, 650503, 0, 1509809, 0, 64800, -101716, 0, 0, 0], [-16898079, -397662, -154916, 0, 16898079, -583891, -583891, 234924, -200749, 154916, 200749, -234924], [0, -200444, 0, -200444, -7651334, 0, -678056, 0, 0, -264680, 132884, 327600], [0, -30557, 0, -30557, -4732202, 0, 747230, 0, 0, 659680, -3835, 111640], [0, -1253102, 0, -1253102, 13936526, 0, 360664, 0, 0, 80916, -26326, 171396], [0, 1679610, 0, 1679610, 10123948, 0, 982152, 0, 0, -724860, -527406, -9060]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_35_e_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_35_6_e_a();".
// 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_35_6_e_a(:prec:=12)
    chi := MakeCharacter_35_e();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 6));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(997) - 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_35_6_e_a();".
// 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_35_6_e_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_35_e();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,6,sign)));
    Vf := Kernel([<2,R![254016, 453600, 1657728, -1125720, 3125728, 471890, 309235, -22195, 10044, -275, 124, -5, 1]>],Snew);
    return Vf;
end function;