
// Make newform 325.6.a.g in Magma, downloaded from the LMFDB on 29 April 2026.
// To make the character of type GrpDrchElt, type "MakeCharacter_325_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_325_6_a_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_325_6_a_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 := [-19440, 6624, 6120, -8, -163, 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], [-12312, -30420, -1814, 851, 18, -5], [-96552, 30420, 3830, -851, -18, 5], [29880, 3060, -3098, -103, 30, 1], [80856, -41148, -1994, 2705, -18, -23]];
    Rf_basisdens := [1, 1, 2016, 2016, 336, 2016];
    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_325_a();"
function MakeCharacter_325_a()
    N := 325;
    order := 1;
    char_gens := [27, 301];
    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_325_a_Hecke( : Kf := Kf)
    return MakeCharacter_325_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]];
    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], [-6, -1, -1, 0, 0, 0], [0, 0, 0, 0, 0, 0], [-38, 6, 1, -2, 0, -3], [-24, 13, -7, -4, -1, 6], [-169, 0, 0, 0, 0, 0], [-130, 66, 27, -2, -1, 1], [192, -77, 23, -20, 3, -10], [-1450, 109, -102, -2, 1, 25], [1340, -258, 172, -28, 36, 10], [448, 389, 52, 14, -18, -35], [-2360, -696, 169, 22, -1, 9], [494, 90, -237, 334, 11, 121], [-614, 903, -69, 48, -82, 0], [1742, 290, 331, 26, -144, 127], [-1178, 1714, 259, 30, -53, 17], [-4552, -1055, -489, 112, -165, 292], [-140, -2026, 1030, -160, 74, 124], [-10510, -668, 1419, -34, 430, -91], [-11940, 1727, -1312, 290, 394, -45], [-8776, 5236, 1817, 214, 169, -31], [36660, 3730, -3378, 344, -104, -652], [-21014, -1682, 1291, -678, -390, -121], [15742, 8924, -486, -460, 338, -274], [-41394, -2176, 0, 448, -672, -1040], [-29862, 3292, 3394, -524, -1014, 822], [-87442, -4889, 424, -138, -447, -715], [-10634, 1563, 665, -1484, 1234, -226], [-12790, -2928, 1310, -1276, -942, 990], [31570, 5426, -2221, -290, 1055, 665], [-19862, 3321, 2138, 2774, -1539, -3], [-84408, -3492, 370, -3044, 1032, -1590], [34794, -6500, 1622, -4276, -330, -390], [568, -16282, 3672, -1604, -202, -2798], [-135906, 9488, 8028, 2280, 256, -1644], [212596, -5947, 3540, -1970, -2010, -419], [-68078, -9120, 758, 4148, 2706, -2250], [-47842, 6700, 6399, 686, -2328, -1051], [23474, -9782, -1017, -3398, 630, 4063], [61986, 1378, 18435, 1950, 4207, 537], [9120, -28112, -6748, 7376, -2274, -4080], [264804, -254, -6578, 6312, 966, -2824], [-87624, 4484, -21104, -11864, 948, -4500], [-127302, 17144, -6736, -3648, -2348, 6448], [136530, -20956, -26450, 4876, -4122, 1050], [256900, 13940, -19040, -2560, -90, 1000], [-88376, 26204, 1288, 3536, -3286, -320], [-502486, -19034, -19523, -9066, 8004, 1817], [613838, -21144, -29571, 2650, 3086, -2393], [-149194, 83886, -13895, -5030, 7817, -2181], [83758, 36904, 4818, 956, -1278, -958], [-445980, -69969, 1250, 19478, 2922, 1953], [-75434, -3790, -43499, 218, 2617, 6307], [160492, -105558, -22456, -7028, 920, 3458], [281402, -58544, 43930, -8884, -5798, 2098], [-138114, 109001, -23496, -5742, -4547, -15393], [-35406, -56296, 24568, 14032, -8080, 8592], [150812, -9927, -47208, 558, 5842, -12459], [-182918, 43134, 43609, 3034, -4767, 18699], [129198, 8094, -61473, -26562, -6421, 6033], [-860230, -104261, -46903, 10972, -4324, -5446], [120268, -37396, -23695, 8110, 11783, 7541], [-325290, -59962, 39713, 40038, -6958, 2569], [560676, 12306, -34220, -22196, -8134, 7674], [-650810, -132210, 4491, 9798, -5225, 4365], [1184260, 61408, 116119, 20490, -6515, 2951], [330424, -62245, -81063, 11104, 14239, -29468], [328762, 28686, 57797, -25534, 15941, 3687], [-1509106, -153147, -90549, -1868, 2266, -17546], [-552934, -39486, -38971, 56954, -20359, 29859], [-1063716, 83492, -69065, 34666, -5901, 31983], [563560, -17, -66464, 28218, -16100, 1151], [-1556726, 96411, -114546, -7158, 2641, 18579], [-1406574, -38272, -146466, -31100, -16230, -21794], [-733204, 23913, -1453, 2888, 3271, -984], [-573398, 38066, 80767, 8586, 30302, 575], [-2487482, 14032, 67536, -75760, 15000, 15680], [-673336, 188668, -116337, -31630, 3629, -32437], [174710, -143340, -119818, 66300, -3894, 19834], [-43794, 455374, 18545, 1306, 21449, -3517], [-220836, -31058, 3600, -51420, 29972, -28026], [368786, 247884, 253750, 6172, -2446, 12834], [-839664, -280547, -30122, 62170, -9264, 4383], [499014, -218044, 153120, -11672, 27972, -24260], [123896, 458256, -160714, -7372, 5178, 36726], [-873014, 282799, -58695, 50108, 1094, 42458], [-2333510, -297882, 90241, 7866, -21391, 5723], [660166, 308412, -7074, 28716, 6338, -10374], [1555794, 479270, -129183, -5334, 19305, 33387], [1049810, 565120, 24763, -30330, -4870, 7817], [-40578, -198825, -79197, 12144, -50986, 13032], [-936600, 336175, -44952, -38502, 11480, -77505], [-1513958, -221688, -151497, 59934, 34650, -10923], [-1068316, -50730, 43114, 49040, -16034, 96016], [978912, -146105, 67573, 7368, 24353, -36160], [-811938, -161717, -50630, 105490, -59139, 54447], [88090, 70994, 240865, 105234, 21729, 61319], [1148256, -94542, 356674, -96008, 4744, -114576], [-3593414, -426477, 200097, -58956, 16698, 29166], [-1580818, -390654, 166501, -190070, -4535, -44733], [-540570, -259189, -128561, -148888, 33920, -788], [5054968, -66480, 76477, 25086, 18107, 34373], [914090, -364257, 347027, 29760, 8622, -23648], [-2330572, 357354, -43610, 17744, -11644, -142532], [-5239728, -39842, 164144, 9868, -5214, 7514], [-3050168, 225732, 102333, 12942, 34829, 52197], [2439486, 160076, -472713, -84450, -25436, 18261], [13350, 650604, -39334, -124780, 18398, -80010], [-5641164, -491274, 86288, 128588, 21102, 95226], [5238250, -681208, -82592, -22336, 54816, 27064], [-4862670, -374143, -554168, 58226, 43281, 83983], [-7271210, 206088, -124800, 40416, 34716, -41808], [-5373398, -121000, -218140, 58648, -83160, -29452], [2558928, 273241, -52225, 57952, 79411, -46780], [2742664, 559139, -219126, -132842, -37408, 40705], [231362, -254876, 167418, -57212, -119638, 15670], [-5069878, 340186, -356067, 15854, -25572, 147533], [-3357054, 395609, -79240, -125494, -48493, -79773], [-6995338, 1313056, 288354, 136540, -25142, 13306], [-7695556, -716150, 145684, -91852, -32452, -69170], [8414794, -1037812, -256698, 64684, -41162, 14314], [595342, -954738, 546125, 45506, 17101, -123729], [3265942, -94310, 55671, 193814, -71885, 94133], [6347602, -136540, -219901, -52082, -9646, 22085], [-5241632, 1007, 207449, -55608, -54761, 17224], [-9846102, 500352, -169008, 11856, 27552, 74400], [8181790, -513802, 646557, -12494, -37519, -109649], [1170980, -133316, 310890, 123484, -59116, 124090], [-760062, -1258645, 130670, -288078, 3391, 3799], [4184938, 762456, -2992, -35680, 105860, 45888], [-1244164, -406053, 119089, -170696, -915, -60240], [-2691046, 635662, 274595, 129018, -104490, 182599], [-3440728, 142650, -125546, -298208, -11666, 35208], [4390466, -821258, 737481, 187322, -108939, 265163], [-620446, -91568, 17420, -68520, -38976, 146308], [-1188390, -1433828, -415752, -106072, 58836, 105308], [-3938040, 1515796, 411131, 19370, 72929, -35601], [1660846, -485022, 32021, 467894, -126310, 124161], [-1237950, -370676, -277634, -11156, 237594, -19446], [-2456628, -125294, 140160, 257628, 6910, -157578], [-1242328, -1736289, 108719, 79292, 82157, 228390], [-3376162, 842868, 219944, -28440, 101876, 9124], [-20659250, 1614699, -70910, -188870, 174491, -184581], [2097314, -1636450, 391295, -66270, -19106, -193925], [12338332, -1753126, -217792, -467196, 117248, -162614], [6221516, -987455, 875644, 165614, -103836, -204251], [3129076, -2777928, -229345, -109606, 70201, 178431], [922186, -2417864, 14358, -132172, 14250, 24254], [13152052, -760126, -215498, 112976, -18658, 219184], [8441898, -736230, -619675, -136066, 35988, -245499], [5976686, 476416, 561264, 257216, 120496, 239216], [3151008, 1537894, -655334, 228544, 139560, -78660], [6174306, -520585, 754203, 191584, -153554, 72592], [-8709358, -166469, -172972, 165918, -12621, 23641], [4913438, 1201783, -248365, 143200, 61954, -40192], [-1825284, -74484, -935644, -514792, 23910, -349284], [15926028, -2089646, -1444580, 249132, -48010, 243674], [8600082, 458462, -120463, 34010, -106267, -227589], [-7043546, 1468908, -728336, -427544, 63104, -343716], [6799870, -950054, -1682193, -18682, -96977, 185909], [7650090, -1635910, 388851, -27054, 38078, 39747], [-6570718, -484740, -44560, 564072, -174812, 204196], [-484230, 530456, -1271623, 20826, -43592, 114295], [-28586720, -2091048, 1249716, -450688, -30074, 113528], [-3565704, 60692, -1126327, 102614, 77921, 29601], [699778, -1318256, 624815, 172990, 150558, -176035], [-2369632, -647568, 651486, 546180, 96962, 45150], [-10907538, -2027242, 814117, -107470, -156151, 273511], [12171522, 899476, 1036708, -139776, -209496, -305824], [-13471266, -1124514, 894733, 716482, 10045, 9567], [-20748276, 3658329, 583037, 177860, 123197, -57486], [-3161354, -218134, -731967, 15922, -3639, -202385], [-6500664, -809338, -1813328, -460316, 168008, -263754], [17360068, -790884, -540761, -706022, -130789, -142425], [-3851104, -1449444, -104642, -886676, -72390, -167622], [3932674, 707184, 323608, -202416, 256136, -140440], [-26300756, 1131059, 390335, 275508, -28271, -70478], [10319082, -2461746, -1115301, 371910, -126385, 614301], [-10830466, 2845849, 292772, -643358, 135047, 173567], [-16397890, 788064, -1034132, 164056, 52836, -30756], [-26099194, -4266254, 545147, 182074, 105496, 196271], [-23249064, -1726566, 564538, 70528, -157072, -363360], [36798442, -1015218, -273657, -113394, 160847, -41631], [18771786, 1808460, -306034, 137612, 141450, -231894], [-22189242, -3560056, -1857557, -188354, 81452, -119907], [11209272, -1785106, 493850, -342184, -111042, 153288], [35290594, -478020, -696396, 189696, -266500, 299280], [31198578, -1446490, -1692223, 282702, -9504, -144467], [-25975898, 294050, -1282245, -45506, -459625, -248639], [24530220, 3990329, 926450, -99286, -44, -14937], [-4379886, 2257130, 200439, 995734, 79935, 594253], [-19397982, 348130, -501381, 420786, 90522, 63531], [8560960, 5545736, -349776, -890408, 446734, -378404], [17833678, 1696124, 308830, -384084, -226, -84718], [8804030, 652341, -276985, -780972, 71660, -104522], [11308638, 4929908, -384172, 146912, 90112, -247104], [3644894, 717294, -2464531, -255502, 78217, 105255], [-31030222, -5033276, 176406, 722828, -57366, -118678], [-4845228, 1373592, -539179, -458794, 46657, 394809], [-7907610, 3894051, 2266398, -878502, -142783, 42459], [-32070822, -1966342, -938983, -5374, 29373, 161055], [24145580, -2142696, 710750, 4172, -356260, 249426], [57232198, 2453304, -1261284, -361176, -744, 38700], [-37763772, -1406606, -260332, -723404, 104618, 305738], [-14690516, -1205629, 109379, 757396, 55315, 29642], [30707482, 2030526, 90633, 269066, 111813, 78803], [10156948, -3111373, 625950, -100394, -283074, -45887], [-13745622, 1165759, -610647, -387636, 121486, -464310], [-28035198, 801688, -1465434, -213036, -17394, 164742], [-8662220, -6254062, -629762, 289760, -158418, -327176], [5110086, 3876500, -2740192, 800424, -334980, 195100], [31131300, 1163214, -1860782, -766712, 82114, -591048], [-31079546, -5598069, -376286, 629314, 87273, 367599], [-4320602, 9537806, -1984937, 38202, 234200, 45215], [76741008, 705389, -8112, 543150, 147880, -129819], [7955938, 209402, 393577, -331102, -617007, -196889], [-17792630, 2247819, -201076, -437122, -352253, 862737], [23912742, 1811552, -201332, 625960, -540468, -248196], [-16051826, -587292, 2097393, -1023190, 314254, -139105], [8027490, 1072344, 535968, 642384, -202776, -1089048], [-32033468, -581770, -2720962, -866688, -54938, -292052], [888924, -1231415, -2361194, 115530, 249498, -131977], [2131966, 401068, -3877806, 279764, -460522, 811550], [-38475450, -6672502, -1790431, 165630, 231966, -487835], [-23247010, 3065335, 1235721, 994036, -252772, -89306], [-31085724, 3498082, 2310476, -416852, 454736, -254842], [-7393302, 5755304, 4189204, -1112744, -131076, -364740], [6003072, 9373658, 1009046, 394736, 190962, 448128], [-13784094, -3673453, 1537798, 1978562, -59385, 895255], [-21874972, 7082051, -2004759, 612448, -198297, 725212], [-35534666, -6816252, -4886468, -207728, 350924, -504528], [32268212, 4817190, 3299902, 22744, -57226, 490428], [-17545756, 254547, 2298500, 1715330, 210494, 304443], [-16932114, 1619892, 2882994, 1267572, 250066, 150942], [64135850, -4702673, -264941, -526872, -160748, 31220], [-36944918, -600764, -239517, 1562846, -1025662, -140203], [34993366, 6228518, 878419, -30442, 240915, 862933], [19821428, -5089016, -1474101, -1795166, 620493, -3653], [-38611464, 275204, -1072800, -182304, -117386, 406680], [-39764744, 4820348, -591850, 225004, -936738, 663482], [-13518114, -6751102, -342999, 1555326, 193662, -85083], [40453080, 6078586, 4900598, -645416, -544312, -82540], [2469758, -5333333, -311116, 1356526, -481617, 1338785], [25125798, -2354618, 2533805, 1583122, -325591, -1246849], [-50481934, 3538944, 208984, -92560, -338512, -381512], [27341376, 2678508, 1174710, -582708, 466334, -1091094], [-45560290, 8733406, 322983, -649126, -81736, -310801], [483064, -1708111, -47057, -325368, 895237, -676072], [-29286052, -7205319, 4105535, -588448, -109, 531636], [-26108738, 8813523, -2613780, -1883290, 988661, -726187], [40317896, -5922116, -468069, 1649690, -161679, -510025], [-36626326, 11985024, 3005872, 485744, -169844, -160520], [-9759806, 1198978, 2162417, -329738, 66468, -192127], [-44917814, -4981120, -3570496, -320496, 642704, -458480], [15431246, 8042552, -5186528, -77104, 261076, -947312], [-32596424, -713847, 534251, 1093336, 218343, -627040], [31650816, 4151794, -3837268, -229364, 37220, -594562], [29054082, 3299396, -2840859, 297706, 97244, -784385], [42081006, -5690616, -4466580, -217560, 144284, 632292], [55629928, -1193208, -5372285, 474778, 114295, -521217], [-46812650, 249825, 2793938, 1121894, 225677, -1741155], [-55138370, 4281237, 224705, -138488, -228620, -2100820], [-25440542, -5418766, -2420757, -821522, 1395139, -66935], [-1484410, -4978814, 1623053, 1330426, -402459, 500723], [-9655116, -3001232, 1702117, 690742, 774893, 30249], [-13789424, 10593746, -2873302, 220080, 1564448, -546104], [33307014, -11679886, -58147, -1750582, 221093, -571197], [53695914, -2954580, 2398492, -1654064, -425820, -1066680], [-75456010, -334688, 5261313, -1847950, 516066, -834157], [-70790226, 3166162, -3638671, -1393246, 39661, 1692207], [-9897774, 5285836, -1545262, -890924, -650822, 427190], [-62159778, 4874156, 3388455, 2317774, 395456, -354803], [46262114, 3220672, 3362168, 876640, 992252, -454816], [-4924196, -3013612, -4346932, 1229064, 358298, 2414068], [-21904074, 1955246, -2300265, 2335006, -784057, 724801], [-31428734, -3776082, 3986379, -1941942, 534894, -413937], [6954574, 1617608, -799963, -2164118, 1356678, -1464145], [-122536978, -666834, 4626191, -1822882, -601873, -34839], [91129002, -11590346, -5470027, 152722, 50749, 1060703], [-56055384, -16092538, 5000224, 1400092, -39454, 1177074], [-50588098, 16694179, 941684, -127266, 910799, -1290503], [101316880, -6265561, 2588468, 1647978, -434546, -936401], [-13285854, 3521217, 7308220, 606442, 1006889, -1142133], [29942854, -5300446, 911117, 879114, 899541, 437347], [2262238, -9570654, -3663763, 249494, 1013734, 1628817], [20513528, 13889738, -701526, 2804200, -1271994, -537068], [8303686, -5068920, 1915394, -2212996, -1687262, -121614], [-82890202, -4008892, 7758930, -2578700, -209026, -891386], [43429448, 14267307, 7374624, -1655310, -799424, -968589], [54223308, 5846138, 5117642, -472024, -197152, -578160], [24184276, -6888106, -867802, -1167248, -28890, 209156], [98205022, 1133675, 3250581, -2637700, 475658, -2103742], [-69353442, -15234676, 4581214, 623548, -506810, 2057154], [-94435232, 3341217, 1038399, -2124280, 1271493, -88072], [-66435002, -11799720, 2410404, -920856, 462736, 1113300], [98826414, 3948120, -3386268, 2462904, 83172, 1658460], [-43266620, -1551880, -227132, 3302432, -711586, -203048], [-25819238, -7611264, -2317174, -169508, -251422, -1656766], [-33326048, 3275534, 6342630, -141088, -351204, 955184], [8139138, 232478, -2363909, -3968326, 1852558, -916865], [-9514266, -11294836, 1173094, -953956, -528678, -2271806], [-127243066, -9603724, -4250610, -350132, 804646, 639850], [18692348, -4729392, -8620384, 1615448, 547562, -77892], [-37862158, -15370633, 10610983, -449680, 349224, 781600], [-26793212, 15143408, 2617358, -3139404, 584822, -2596154], [52005200, 7418536, 6099159, -31630, 1154979, -387949], [-38044522, 12812207, -1633077, 2413408, 66986, 1032784], [-64560822, 5017420, 2240734, 2296380, -1770850, -1635550], [35163372, 7609237, 428994, -5677830, 398162, -1915161], [130613022, 8211212, -3549438, 1056580, 694202, 707014], [65637510, -19927727, 1519558, -618170, 6639, 1027173], [121288862, -2439738, -1667325, -1877786, 883331, 150085], [25107584, 10173242, -7802906, -1970320, -1037408, 1959076], [19554114, 3243917, 4059833, -103704, 291180, 674860], [17001594, -20503994, -2804945, -3978590, -593998, 29595], [-46533444, -10560422, 707968, 1870524, -2058454, -616186], [99293456, 15616855, -7275985, 719748, -538897, -1077014], [-116944684, 862307, 8985216, -563414, 87082, -417257], [-140187680, 1444536, 9741551, 47522, 597795, 628875], [18851558, -1785576, 2494220, -2510232, -148612, -689276], [43902228, -14323946, 1721076, 749948, 1428612, 1986794], [184605624, 7736540, 6632041, -1871434, 657509, -1085183], [-46406356, -7259498, -7572662, 378920, 656570, 2281240], [-37207766, -3987564, 646279, 2276806, -1393986, -2010615], [10929448, 1998364, 7656197, 2972782, 1335973, -1903099], [-73319636, -10598818, 2690212, 3911804, -675150, 1142758], [-35791672, 107769, 1846063, -1147136, 1169207, 1447980], [93122786, -456998, 3182887, -5558310, 1282298, -2266537], [-47988886, -465239, -6956576, -2005558, -212609, -1095149], [62337038, -6197420, -524792, 407864, -351296, 2913100], [2712858, -8698544, 10298868, 1282088, 2358912, -2105284], [-37462514, 16525396, 8466442, 585060, 1237434, -862138], [19132660, -14382634, 3019996, 3124916, -1440782, 2540422], [72775238, 13410888, -771199, -4679982, -768794, 977395], [-191415900, -11670107, -2793241, -2587520, -135051, -1147612], [-2579486, 27995392, -4438049, -386418, -706962, -3885235], [105053526, -12731816, 6477862, 127140, -2935850, 904886], [65331374, 19864, -5929184, -107200, 1253124, 528832], [-60330586, -2519430, 20205289, -240494, 1780929, -1878009], [-123130150, 17774533, 1026886, -1813098, 942425, -2979163], [41027618, -5438396, -11942850, -1453924, -2374, 2528066], [-199307518, -7590510, 520035, 2562334, -413937, 632425], [73260918, 17608560, 4890492, -2611896, -417312, -2554188], [-17286308, 13533746, -3998670, -1684976, -834620, 2794552], [-28003318, -5970708, -14789146, -407268, -1688038, 57346], [5733288, 17453616, -4495190, -1218764, -1446332, -421650], [-290433110, -12231832, -5615688, -2132240, -644680, -1094768], [-101486942, 1930626, 3390749, 4655342, -2246908, 3119301], [-79577156, -28717663, 1152456, -2073538, -1035818, -623035], [164964966, -14337392, 10366578, 1110732, -542042, 2562210], [-9054232, -2470641, -5620839, 5494440, 223323, 728256], [-53153302, -27119336, -4787944, 876256, 901672, 3319520], [48748446, 4092928, -3107768, -1671296, -2864904, 1113960], [9058422, -6002569, -8899722, 666298, -2239545, 1220155], [-119234818, 15747936, -1646328, -5452176, 2285352, -2637720], [-11230278, 4540578, -13133991, 3148098, 584973, 1422039], [51930124, -1197375, -4027784, -6178314, -747104, -3001231], [-76387752, 23355107, 12905861, -3420952, 537171, -3151848], [-77166262, -12348112, 5529436, 5512040, -1601504, 831604], [63536646, -3080742, 12517467, -68982, 1435940, -1628289], [260481892, -9352788, 5824797, 584262, -833393, -872487], [-97218316, 31696878, 5147038, -2807896, 1121040, -724064], [-50475350, 17144511, 4102940, 61558, -1366085, 869669], [106389596, 8100969, 1422453, 1434148, -1319419, -799142], [-108072730, -4026827, 7396399, 1011060, -775560, -3068170], [71402022, -41857162, -1640743, 918090, 694765, -3675509], [-120930074, -10836292, 8505506, 318052, 466414, 2365838], [-42002974, 6426832, 4260881, 5198410, -2501144, 412439], [164773450, 7509764, 592778, -6905820, 419730, -4948106], [-232479928, -16067504, -1374528, -542648, -1626362, -531740], [239295052, -7585540, 81556, 2607152, -1429024, 1173832], [203235862, -10465400, 3987875, 270958, 1119356, -73627], [1513384, 8675518, -3255936, -5079796, 4988760, -513538], [179008452, -15251996, -7748846, -1718100, 1461760, 970754], [-126739406, 14708730, 11439289, -2631470, -690243, 578607], [-129809824, -27430513, 4855885, -67576, 2236037, -377048], [-43112324, 1252914, -16735594, -299576, -2276968, -2193268], [179393166, 36064652, -1129178, -6283972, 1376762, -2346158], [77235064, 19798458, -3946648, -7188164, 1562122, -4081906], [100198362, -31118734, -7730657, 1798790, 798915, 2114437], [6884978, -10680514, -6476983, 4900890, -1797379, -2955821], [-193492064, 3341984, -506385, -2401102, -1313461, -4777789], [-76775894, -1456626, 2587879, -444830, 1507442, -4481589], [28959768, 37550760, -13113217, 3481394, 1799143, 2348931], [200975908, -19889293, -5679413, -10190476, 1190819, -2098382], [-259151558, -15051432, -4433153, -3971394, 2493658, 2930045], [-84516672, -21832523, 5599010, -2980910, 1546020, 416867], [88090282, -10957398, 5133215, 1762790, 2272967, 1446069], [-235093862, -25541394, 469879, 557458, -3125894, -2313861], [311251618, -10196059, 2869522, -2647146, -203701, -1970299], [-25620598, 26115702, 7970611, 1592038, 3610875, -196491], [-34855832, -30298776, -1430163, -7580434, 413035, -88339], [-223001632, 7533989, -886605, -2310752, -1940737, 4790980], [-368696994, -11761465, -10938467, 56900, -660342, -590666], [-48310524, 26218061, 12186746, 6346946, -1723276, 2111283], [-73793222, -9958032, -5182018, 871028, -1503822, -3294114], [62998012, -10366045, 10290404, 1080042, -1863488, -2542601], [157073288, -7576642, -4138024, 3156420, 642238, 4053802], [253401500, 45234708, -2879178, -211428, -764234, -702846], [-179484626, -31861960, -3002680, -3684656, 3328680, 2295488], [3107710, 30745256, -12008088, -83888, -861472, -4441952], [105617414, 19796614, -17040919, -3188070, 1904169, -4064525], [262770502, -19469406, 23419447, -207758, -2449392, -1890285], [24908916, 10013880, 5122509, -3886650, 1633625, -2629359], [214161874, 13718760, 9384196, 5597784, -165360, 1566212], [205838432, 26894124, 8412402, 740868, 2385270, 915582], [-171111020, -12553380, 15191701, 368710, -872525, -570615], [52902718, -42928584, 14516748, -1022104, -2738564, 2696660], [-199927938, 11930960, -12724077, 3962974, -1078060, 5517085], [192098232, -3132995, -5158069, -65728, -2229389, -2547300], [124479846, 27539780, -8247994, -4468020, -1173750, 5391706], [114165142, -16100838, -119651, 2247498, 3207069, 5575115], [9569970, 28492429, -12639067, -5649184, 1202740, -1692528], [188471012, -48325218, -12483940, -2244964, 96724, -2141718], [58616834, -38592200, -14938144, 2819584, 3847848, -3937432], [-192999466, -10824160, -16478020, 264840, -1299612, -4134212], [54276180, 7360031, -25053480, 3291114, 1551080, 4549071], [96699274, -20524947, -8312762, -10002434, -2959133, -973143], [-19738756, -6658148, 10516527, 12114730, -2771861, 5145151], [418020822, -25372157, -7011024, 822030, 359573, -1318911], [34844956, -2153350, 13337096, 1316548, 1907620, -4323622], [12003338, 30156520, -5574572, 2212296, -1499236, 414716], [29788594, 2047308, -10826725, 8103646, -1190854, 2603573], [143739972, -25659630, 7674046, 5219824, -797518, 10374000], [143643190, 24848196, -13615714, -3006628, -481870, 4942818], [20911980, -48553136, 5312715, -935406, -2716563, 1347075], [86664490, 47895331, 4538575, -652704, -3465010, -2708344], [219152030, -2677066, 10546107, 411670, -1887449, -4377227], [273195260, -6275505, 23753819, -53452, 1230869, 1914954], [-414849188, -13688262, 20224136, -3922268, 611770, -2850610]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_325_a_Hecke( : Kf := Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_325_6_a_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_325_6_a_g(:prec:=6)
    chi := MakeCharacter_325_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_325_6_a_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_325_6_a_g( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_325_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,6,sign)));
    Vf := Kernel([<2,R![-19440, -6624, 6120, 8, -163, 0, 1]>],Snew);
    return Vf;
end function;