
// Make newform 441.6.a.bc in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_441_a();"
// To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
// To make the newform (type ModFrm), type "MakeNewformModFrm_441_6_a_bc();".
// 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_441_6_a_bc();".
// 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 := [-135576, 0, 9570, 0, -187, 0, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0], [0, 3318, 0, -139, 0, 1], [-62, 0, 1, 0, 0, 0], [0, -6888, 0, 181, 0, -1], [3388, 0, -139, 0, 1, 0]];
    Rf_basisdens := [1, 1, 84, 1, 42, 14];
    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_441_a();"
function MakeCharacter_441_a()
    N := 441;
    order := 1;
    char_gens := [344, 199];
    v := [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;

function MakeCharacter_441_a_Hecke(Kf)
    return MakeCharacter_441_a();
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 := [[0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, -2, -1, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, -24, 3, 0, -2, 0], [28, 0, 0, -7, 0, 13], [0, -76, -10, 0, 0, 0], [-1568, 0, 0, -7, 0, 1], [0, -64, 22, 0, 4, 0], [0, 250, 61, 0, -8, 0], [-3857, 0, 0, -140, 0, 18], [3060, 0, 0, -89, 0, -133], [0, -184, 104, 0, 56, 0], [-7270, 0, 0, -33, 0, -189], [0, 312, -68, 0, 56, 0], [0, 1202, -175, 0, 0, 0], [0, -4440, 83, 0, 70, 0], [2576, 0, 0, 350, 0, -274], [-24004, 0, 0, -313, 0, 119], [0, 3336, -264, 0, -48, 0], [16716, 0, 0, -119, 0, -259], [-16761, 0, 0, -714, 0, -812], [0, -4312, 567, 0, 14, 0], [0, -492, -190, 0, -112, 0], [-72891, 0, 0, 2149, 0, -7], [0, 4124, -290, 0, 336, 0], [-24458, 0, 0, 735, 0, -181], [0, -2184, 1901, 0, -166, 0], [-41184, 0, 0, 1717, 0, 2177], [0, 3000, -248, 0, -96, 0], [-22707, 0, 0, 190, 0, 2744], [0, 11752, 479, 0, -378, 0], [0, -26828, 614, 0, -568, 0], [-145992, 0, 0, 4249, 0, -2071], [0, 31700, -2030, 0, 448, 0], [-48179, 0, 0, 5541, 0, -5089], [-34888, 0, 0, 10430, 0, -634], [-38378, 0, 0, 7526, 0, -3374], [0, 19128, 2074, 0, -924, 0], [0, 59524, -3726, 0, 1176, 0], [0, -14160, -3284, 0, 976, 0], [-212534, 0, 0, -6181, 0, 3583], [0, -17632, 932, 0, -2096, 0], [-252483, 0, 0, 11346, 0, -854], [0, -1492, -4778, 0, -856, 0], [-56112, 0, 0, -8876, 0, -6172], [224104, 0, 0, -1408, 0, -6776], [-158921, 0, 0, 2303, 0, 2173], [0, 34984, 14993, 0, -406, 0], [591514, 0, 0, -7077, 0, 9263], [0, -100484, -8774, 0, 1248, 0], [0, 110992, -1314, 0, -1028, 0], [-752927, 0, 0, 3465, 0, -2083], [0, -50824, -21065, 0, -2002, 0], [0, 45876, 19410, 0, -1960, 0], [0, -44688, -1416, 0, -1520, 0], [0, 42338, 449, 0, 6216, 0], [-616763, 0, 0, -5803, 0, -4625], [1055706, 0, 0, 5915, 0, 8631], [0, 186612, -8818, 0, -48, 0], [121562, 0, 0, -13741, 0, -3769], [0, -158422, 10109, 0, 1064, 0], [-141428, 0, 0, -3577, 0, 36127], [0, -28872, 20228, 0, -224, 0], [-43827, 0, 0, -39858, 0, 2278], [0, -130254, -19847, 0, 2456, 0], [-1675566, 0, 0, 32865, 0, 3493], [-637259, 0, 0, 36944, 0, -8960], [0, -219200, -5156, 0, 656, 0], [-904778, 0, 0, -29344, 0, -32984], [0, -66240, -26568, 0, -9464, 0], [0, 31976, 25578, 0, 4732, 0], [-1388947, 0, 0, -77756, 0, 40798], [-1284050, 0, 0, -46023, 0, -34363], [928494, 0, 0, 87841, 0, -11179], [0, -86752, -8558, 0, -1652, 0], [0, -229628, 3818, 0, -3208, 0], [1258362, 0, 0, -34475, 0, 617], [0, 215696, -15560, 0, -7976, 0], [268863, 0, 0, 60354, 0, 12922], [0, -13136, -30732, 0, 11032, 0], [4345310, 0, 0, -42933, 0, -19761], [0, 334904, 50864, 0, 2304, 0], [555184, 0, 0, 17927, 0, -4493], [-193067, 0, 0, 87493, 0, -12897], [0, 282648, 12079, 0, -11170, 0], [0, -545244, -36630, 0, -24, 0], [-2501497, 0, 0, 64730, 0, -9310], [0, 281940, 34682, 0, 3696, 0], [-1143194, 0, 0, -116083, 0, 16681], [0, 252592, 9844, 0, 336, 0], [0, 401168, 33928, 0, 14952, 0], [1243141, 0, 0, 64976, 0, 41818], [0, 53000, 73463, 0, -18922, 0], [-2187516, 0, 0, -93151, 0, -77847], [0, 485352, -42378, 0, -11340, 0], [0, -750150, -12027, 0, 8288, 0], [0, -403024, -25000, 0, -17136, 0], [-4005428, 0, 0, 29351, 0, 100447], [-91714, 0, 0, -45405, 0, 69279], [115174, 0, 0, -119218, 0, -51758], [0, 675142, -59541, 0, -34408, 0], [0, -1265800, 56019, 0, -1050, 0], [0, -97804, -110002, 0, 14824, 0], [-2868306, 0, 0, 167175, 0, 3451], [-4932473, 0, 0, -92596, 0, -47924], [0, -839576, 1045, 0, 5698, 0], [0, -534548, 96166, 0, -34944, 0], [0, -166872, -8314, 0, -15644, 0], [-5499081, 0, 0, -148232, 0, 176600], [-4019267, 0, 0, -70560, 0, -66838], [6984130, 0, 0, 100676, 0, 50596], [0, -856208, 53340, 0, -43064, 0], [1070622, 0, 0, 105749, 0, -33111], [6441107, 0, 0, 89811, 0, 109641], [0, -197072, -87844, 0, 80, 0], [-2378572, 0, 0, 162477, 0, -201939], [0, -1256376, -21260, 0, 5152, 0], [0, -382378, -83165, 0, -16568, 0], [0, -751408, -68028, 0, 9008, 0], [-6658750, 0, 0, 6377, 0, 183389], [4775677, 0, 0, -140314, 0, 241486], [0, -659946, 36379, 0, 58520, 0], [0, 1720952, 71549, 0, -7062, 0], [-831054, 0, 0, -245175, 0, 102037], [0, -169782, 17853, 0, 20928, 0], [-668858, 0, 0, 213700, 0, -134988], [0, -1053008, -162854, 0, -29820, 0], [-2301061, 0, 0, -38010, 0, -237396], [6961010, 0, 0, -333893, 0, -87785], [11336904, 0, 0, -22523, 0, 61061], [0, -456920, -187842, 0, 18436, 0], [-196563, 0, 0, -417334, 0, 124740], [-11948512, 0, 0, 282618, 0, 115626], [0, -482740, 7774, 0, -39368, 0], [-5672191, 0, 0, -123690, 0, 181038], [0, 1488108, -39218, 0, 10864, 0], [-18833080, 0, 0, -70504, 0, 88784], [0, -351714, -237737, 0, 40992, 0], [0, 1481672, 115028, 0, 13848, 0], [-6314854, 0, 0, -523950, 0, 45438], [0, 1690330, 14421, 0, 23664, 0], [16239448, 0, 0, 386260, 0, 42084], [0, -1461336, 147591, 0, 45246, 0], [-1580908, 0, 0, -234087, 0, 4437], [0, 1073320, 191518, 0, -13580, 0], [24852128, 0, 0, -73521, 0, -87453], [0, 235104, -107652, 0, -5768, 0], [-5830832, 0, 0, -150696, 0, 268808], [0, -58208, -179834, 0, -52740, 0], [-9753828, 0, 0, -341302, 0, -117390], [0, 2403012, 45918, 0, 28560, 0], [-14625754, 0, 0, -157779, 0, -197631], [0, -553248, 170214, 0, 73052, 0], [-687932, 0, 0, 350055, 0, -236257], [0, -312232, -360120, 0, -82816, 0], [7054046, 0, 0, 68877, 0, 214137], [0, -2259920, -37512, 0, -114744, 0], [9920043, 0, 0, -691208, 0, -92440], [0, 1452502, -265397, 0, 96656, 0], [0, 1221712, 296004, 0, 83112, 0], [0, 1833400, 526940, 0, 7816, 0], [-10521233, 0, 0, 314318, 0, -644], [0, 3754312, 244441, 0, -73374, 0], [0, 1301544, -103996, 0, -69344, 0], [0, -746504, 288080, 0, -31024, 0], [-12769645, 0, 0, -588960, 0, 459942], [32846016, 0, 0, 150059, 0, 449151], [21577111, 0, 0, 418046, 0, 311878], [0, 1654422, -415149, 0, 75992, 0], [0, 1988008, 117665, 0, 88250, 0], [-16141524, 0, 0, 288442, 0, -308398], [0, -4453624, -189710, 0, 94684, 0], [15202093, 0, 0, 1281816, 0, -684040], [-3936303, 0, 0, -239778, 0, 42544], [0, -1111984, -146128, 0, 68768, 0], [-16030046, 0, 0, -143431, 0, 341005], [0, -1063226, 390579, 0, 114128, 0], [4604124, 0, 0, -190400, 0, -394024], [9340898, 0, 0, -1004143, 0, 162941], [-5061309, 0, 0, -122040, 0, -8498], [0, 2885576, -455031, 0, 128954, 0], [3770852, 0, 0, 450129, 0, 29421], [0, -914452, 472458, 0, 100576, 0], [0, 2937456, -343474, 0, 35596, 0], [0, 2386982, 823387, 0, 22008, 0], [-45728336, 0, 0, 615050, 0, 110194], [-2002224, 0, 0, -852397, 0, -134757], [11824047, 0, 0, 1115366, 0, -117474], [0, 6606856, -444834, 0, 114212, 0], [6716101, 0, 0, 997892, 0, 695380], [0, -508456, 351477, 0, -46102, 0], [33379202, 0, 0, -904638, 0, -16002], [0, 7284084, -291398, 0, -128968, 0], [0, -1540664, 601503, 0, -140434, 0], [0, -185364, 503774, 0, -183680, 0], [-15839844, 0, 0, 163203, 0, 759871], [13079236, 0, 0, -1701026, 0, 36414], [0, 2391512, 531372, 0, -145600, 0], [0, 1013608, 430924, 0, -41160, 0], [0, -2079578, -149165, 0, -67768, 0], [-36877918, 0, 0, 992481, 0, 650949], [36374366, 0, 0, -778652, 0, 410860], [21735546, 0, 0, -345436, 0, -667692], [0, -2304800, -516604, 0, 76216, 0], [0, -270246, -367187, 0, -96152, 0], [-34077792, 0, 0, 1906324, 0, 496724], [0, 623336, -256967, 0, -42758, 0], [0, -1365532, 100134, 0, 253592, 0], [37425206, 0, 0, -238714, 0, -242014], [26742948, 0, 0, -370409, 0, -545965], [0, 4755694, -436377, 0, -166376, 0], [31116241, 0, 0, 641777, 0, -889469], [0, 1646024, 328217, 0, 258370, 0], [0, 813400, 240478, 0, -8260, 0], [73688972, 0, 0, 113687, 0, 260243], [7105527, 0, 0, 881367, 0, -1204427], [0, 9891708, -421578, 0, -193760, 0], [0, 5664360, -1011874, 0, 200300, 0], [0, 3062716, -230106, 0, 119944, 0], [-19342670, 0, 0, -1661625, 0, 1515395], [-863114, 0, 0, -710689, 0, 1461835], [0, -4915224, 27984, 0, -146224, 0], [-8408875, 0, 0, 22101, 0, -269745], [0, -2489656, -64663, 0, -193606, 0], [7659800, 0, 0, -880218, 0, 509502], [0, -2554852, -501238, 0, -117992, 0], [0, -7802160, -405092, 0, 142120, 0], [-47090589, 0, 0, -2023854, 0, 960616], [0, 3738384, 198136, 0, 60008, 0], [-55279414, 0, 0, 1248527, 0, 1157555], [-25087496, 0, 0, -739816, 0, 487456], [-61616737, 0, 0, 403674, 0, -116760], [0, 8764604, 602766, 0, -183360, 0], [-25570104, 0, 0, -1058435, 0, -1730755], [0, -1436048, 931358, 0, 301364, 0], [32082771, 0, 0, 910994, 0, 1052970], [0, -3082618, 1460907, 0, -202664, 0], [0, -7090592, 1152120, 0, -75584, 0], [0, -9129008, 784490, 0, -78596, 0], [0, 2110576, 1669352, 0, 40232, 0], [-31268874, 0, 0, 288967, 0, 772715], [-38216423, 0, 0, 2814490, 0, -494388], [31537150, 0, 0, 1592600, 0, -925232], [0, -1771988, -496626, 0, 22624, 0], [0, -11791096, -1266448, 0, 199696, 0], [55714771, 0, 0, -401086, 0, -1172360], [0, -10384544, -609260, 0, -55888, 0], [20895224, 0, 0, -2330152, 0, -399448], [0, -4711656, -1194888, 0, -53544, 0], [78058136, 0, 0, 1648125, 0, 14889], [0, 9728632, -631328, 0, 331296, 0], [0, 9748136, -1298178, 0, -112140, 0], [41860924, 0, 0, -1696723, 0, 421393], [0, -10141398, -610467, 0, -35672, 0], [0, 6928664, 747699, 0, -56066, 0], [105634034, 0, 0, 150471, 0, 1429155], [53126066, 0, 0, -1018871, 0, 1021333], [0, -2500062, 1276857, 0, 632352, 0], [91404719, 0, 0, 2445135, 0, -1157637], [-15991910, 0, 0, -775455, 0, 1334165], [0, -3460296, 1611611, 0, 263022, 0], [3662316, 0, 0, -2621199, 0, -775811], [18678254, 0, 0, 1101177, 0, 2005365], [0, -19099088, -1022396, 0, 204008, 0], [-18303012, 0, 0, -1159767, 0, -2935319], [0, -7272858, -835101, 0, -294312, 0], [0, 7930996, 1142650, 0, -91448, 0], [-75096788, 0, 0, -1167076, 0, -969332], [0, 4009358, -1000329, 0, 122328, 0], [132374130, 0, 0, 1416233, 0, 501549], [88948658, 0, 0, 1001418, 0, 1502046], [99239049, 0, 0, -452620, 0, -91692], [-128424239, 0, 0, 152952, 0, -1658902], [-42718445, 0, 0, -2310385, 0, 181195], [-48223168, 0, 0, -1394988, 0, 2104692], [0, -3129416, 1625765, 0, -361014, 0], [56632400, 0, 0, -208145, 0, -1199765], [-59717912, 0, 0, 125627, 0, -1669913], [0, 11343136, -251580, 0, -368592, 0], [0, -9757688, 413464, 0, -584920, 0], [20329495, 0, 0, 2454526, 0, -1523844], [0, 3637488, -560542, 0, -175308, 0], [24545038, 0, 0, 4157909, 0, -2304623], [-90096818, 0, 0, 1233414, 0, 512714], [0, 11521288, 113458, 0, -425172, 0], [-151705853, 0, 0, -3082138, 0, 1419502], [0, -16820570, -74493, 0, -198656, 0], [-150916031, 0, 0, 285138, 0, 1718948], [0, 9062016, 725808, 0, 235032, 0], [0, -14470356, 1234566, 0, 133408, 0], [0, 3927736, 2016837, 0, 16562, 0], [0, -6311128, -2638820, 0, -477800, 0], [0, -2258336, -2529252, 0, -217448, 0], [64071364, 0, 0, -3239353, 0, 139363], [0, -11385394, -318489, 0, 54936, 0], [-137623738, 0, 0, 434819, 0, 22367], [0, 4200180, -1069006, 0, -493752, 0], [0, 4641728, 3544716, 0, 16240, 0], [13603310, 0, 0, 3516093, 0, 1295769], [-129148390, 0, 0, -339248, 0, -500288], [0, -6115874, -2558273, 0, -637128, 0], [23656627, 0, 0, 1093715, 0, 2867977], [0, 8272056, -286601, 0, 966, 0], [-112210246, 0, 0, -2491169, 0, 3576475], [-13645584, 0, 0, 863029, 0, 3091193], [0, 3437848, 3080927, 0, 624734, 0], [-112936572, 0, 0, 2280229, 0, 1855529], [0, 15737920, -1125598, 0, 438516, 0], [-75480248, 0, 0, 2822855, 0, 734251], [0, 16937688, -709010, 0, 653660, 0], [0, 15021300, -2316110, 0, -335240, 0], [0, -18879468, 1493626, 0, -161920, 0], [108962584, 0, 0, 4203664, 0, -657552], [0, -12834200, 220502, 0, 685252, 0], [-32343808, 0, 0, -1474431, 0, 852165], [0, -13251832, -868689, 0, -29890, 0], [0, -21373032, -1892086, 0, 574756, 0], [-69857375, 0, 0, 164780, 0, -4307780], [0, 5797984, -2280600, 0, 970144, 0], [-138881918, 0, 0, 4413255, 0, 2092667], [-36279072, 0, 0, -3243121, 0, -776853], [0, 14385042, 1153761, 0, -15624, 0], [108085706, 0, 0, -1236651, 0, -852327], [0, 4181104, -2380828, 0, -745480, 0], [259872991, 0, 0, -1233106, 0, 1276822], [-28024070, 0, 0, 2534225, 0, 4253221], [-207648924, 0, 0, -3246327, 0, 1627297], [0, 6956296, 1349646, 0, -458652, 0], [0, 13627542, 1449843, 0, -629232, 0], [-220209082, 0, 0, -356617, 0, 1707251], [0, 8511654, -1978237, 0, 749776, 0], [-281601922, 0, 0, 4643667, 0, 88479], [0, 19475584, -1541812, 0, 824936, 0], [43733212, 0, 0, 5918363, 0, -2296973], [0, 16025840, -1588196, 0, 970592, 0], [170030762, 0, 0, 1041708, 0, -452844], [0, 8483624, 1778680, 0, 960232, 0], [-28006531, 0, 0, 3109932, 0, 1026588], [-119527415, 0, 0, -3579982, 0, -3693740], [-207731502, 0, 0, 707777, 0, 54621], [0, 30721260, 781550, 0, 557760, 0], [0, -41025854, 603441, 0, 19936, 0], [-210562967, 0, 0, -425722, 0, -1857800], [0, 31746730, -1128363, 0, 391728, 0], [0, -16263688, 841693, 0, -19870, 0], [-35831936, 0, 0, -3655183, 0, -673115], [7684898, 0, 0, -964510, 0, -5034274], [0, 26105624, -770382, 0, 837788, 0], [0, 11205218, -2767431, 0, -1070216, 0], [-234537534, 0, 0, -3737398, 0, 678486], [110822265, 0, 0, 2974489, 0, -139699], [0, 4556532, 430618, 0, 53616, 0], [-284568277, 0, 0, -567245, 0, 741001], [-106783074, 0, 0, 4854125, 0, -1605807], [0, 33153184, 291344, 0, -97160, 0], [0, -18440896, -2140004, 0, 248752, 0], [0, 30252728, -1573501, 0, -222474, 0], [0, -35396736, -1204464, 0, -94984, 0], [0, -42502696, -2869398, 0, 363356, 0], [-68371116, 0, 0, -3587174, 0, 843794], [0, 25194608, 2822168, 0, -894824, 0], [0, 17440136, -1648606, 0, -977316, 0], [0, 34553968, 773796, 0, -824088, 0], [14760284, 0, 0, -6192375, 0, 1921185], [-74595427, 0, 0, -596743, 0, 1568861], [0, 3955188, -1452742, 0, -1401792, 0], [291063262, 0, 0, 1771715, 0, -2806769], [188330643, 0, 0, 3714859, 0, -2033353], [0, -19023560, 587381, 0, 863018, 0], [105579894, 0, 0, 6433147, 0, 1807367], [0, -15457216, 2944030, 0, 1085860, 0], [0, 41950082, 1819785, 0, -323560, 0], [-222837006, 0, 0, -5497695, 0, 2722165], [-243427208, 0, 0, -5385667, 0, 4263553], [0, -10940464, -7058364, 0, -694848, 0], [0, -176656, -6426458, 0, 564356, 0], [82989137, 0, 0, -3145443, 0, 2602689], [0, 19932796, -1660490, 0, 308112, 0], [5138448, 0, 0, -10595711, 0, 2389301], [0, 38931476, -689390, 0, -1040088, 0], [0, 68656, 1459236, 0, -400952, 0], [-145910960, 0, 0, -3411460, 0, 5520508], [0, 23976572, 2035078, 0, -373368, 0], [-95686500, 0, 0, 6406372, 0, -898372], [0, 21329616, -1561028, 0, 286552, 0], [124958290, 0, 0, -11754963, 0, 1650929], [476129780, 0, 0, 2591582, 0, -2508682], [-274362664, 0, 0, 8037903, 0, -1975617], [0, 23221672, 3168738, 0, 1203076, 0], [443738497, 0, 0, 2135528, 0, -2446472], [0, 2883252, -2372366, 0, 1167488, 0], [0, -40280776, -6358501, 0, 767598, 0], [-58097298, 0, 0, 1252629, 0, -5853095], [0, 7209208, -3800550, 0, 1064988, 0], [-167061079, 0, 0, 835193, 0, 5885453], [19411567, 0, 0, 3632279, 0, 7120453], [0, -14169244, -2518494, 0, 415856, 0], [-370345524, 0, 0, -1583129, 0, -2588929], [0, 18722646, -731749, 0, -723536, 0], [13531378, 0, 0, 3775716, 0, -599380], [0, 35233268, 1314762, 0, 339448, 0], [70931292, 0, 0, -3410800, 0, 2854824], [0, -29739148, 838342, 0, -387128, 0], [0, 23372666, -2575747, 0, 217560, 0], [-190433831, 0, 0, 2140418, 0, 5380], [-354388330, 0, 0, -1588892, 0, -10447556], [0, -8098224, 5877848, 0, -1476816, 0], [-7760466, 0, 0, 4314975, 0, -5853773], [0, -5225688, 5768851, 0, -1375906, 0], [3090465, 0, 0, -794787, 0, 9413809], [0, -30094922, -625893, 0, 1331448, 0], [0, 20805304, -3274267, 0, -2110862, 0], [51404396, 0, 0, 11291324, 0, -9387364], [141946884, 0, 0, 6524329, 0, -5707219], [0, -10977398, -101891, 0, 743064, 0], [0, -26468984, -6082592, 0, -289176, 0], [-332072510, 0, 0, -8798937, 0, -1925029], [0, 5946924, 1328826, 0, -314664, 0], [0, 8936624, 6847276, 0, -413840, 0], [0, -59469938, -2416657, 0, -360352, 0], [277664968, 0, 0, 3288047, 0, 10487419], [0, -11557536, -4080964, 0, -174408, 0], [0, -44739640, -1684729, 0, 752990, 0], [-74711266, 0, 0, 3553452, 0, -7769988], [0, -22446468, 4637030, 0, 1264312, 0], [0, -13241752, -768379, 0, 819562, 0], [0, -54875652, -1048422, 0, -649896, 0], [110079354, 0, 0, 2484202, 0, -5979682], [0, -33376928, 1279556, 0, -1465576, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_441_a_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_441_6_a_bc();".
// 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_441_6_a_bc(:prec:=6)
    chi := MakeCharacter_441_a();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 6));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(2999) - 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_441_6_a_bc();".
// 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_441_6_a_bc( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_441_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,6,sign)));
    Vf := Kernel([<2,R![-135576, 0, 9570, 0, -187, 0, 1]>,<5,R![-56228247936, 0, 51437073, 0, -13138, 0, 1]>,<13,R![60080636, -783976, -77, 1]>],Snew);
    return Vf;
end function;