
// Make newform 325.6.b.f in Magma, downloaded from the LMFDB on 15 March 2026.
// To make the character of type GrpDrchElt, type "MakeCharacter_325_b();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_325_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_325_6_b_f();".
// 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_b_f();".
// 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 := [2250553600, 0, 738923264, 0, 65636064, 0, 2365264, 0, 40401, 0, 326, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [27729818560, 0, 7581670960, 0, 514595636, 0, 12609065, 0, 125290, 0, 433, 0], [57572090080, 0, -7905208736, 0, -1109046834, 0, -34914705, 0, -409504, 0, -1621, 0], [3203264064, 0, 494495312, 0, 23670316, 0, 551647, 0, 5926, 0, 23, 0], [187576425280, 0, 74605838704, 0, 7009165516, 0, 202704145, 0, 2264466, 0, 8649, 0], [-215961478720, 0, -64100715920, 0, -4299802012, 0, -106093495, 0, -1091430, 0, -3983, 0], [0, -18709825579072, 0, -12948767099856, 0, -540210631500, 0, -6623091303, 0, -20244854, 0, 45345], [0, -18060977905984, 0, -3488359425424, 0, -196094882684, 0, -4417899131, 0, -42503326, 0, -146131], [0, 12800153679424, 0, -89807555952, 0, -604717356212, 0, -22208846909, 0, -264616098, 0, -1028933], [0, 328905061230784, 0, 44496191856432, 0, 2070951836580, 0, 43408925001, 0, 415749338, 0, 1473585], [0, 3731837243328, 0, -1366808097232, 0, -145144038412, 0, -4191810103, 0, -46523158, 0, -176943]];
    Rf_basisdens := [1, 1, 1015329792, 1269162240, 15154176, 5076648960, 1269162240, 12041811333120, 12041811333120, 6020905666560, 6020905666560, 179728527360];
    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_b();"
function MakeCharacter_325_b()
    N := 325;
    order := 2;
    char_gens := [27, 301];
    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_325_b_Hecke();"
function MakeCharacter_325_b_Hecke( : Kf := false)
    N := 325;
    order := 2;
    char_gens := [27, 301];
    char_values := [[-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 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 := 6;
    raw_aps := [[0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, -1, -3, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 6, 0, 0, 0, 0, 0, 0, 27, 1, 0, 1], [124, 0, -28, 8, 1, -1, 4, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 169, 0, 0, 0], [0, 6, 0, 0, 0, 0, 0, -12, 734, 19, -24, -2], [-948, 0, -124, 24, 5, 63, 20, 0, 0, 0, 0, 0], [0, -6, 0, 0, 0, 0, 0, -37, 205, -43, 40, 2], [602, 0, -94, -32, -54, -14, 9, 0, 0, 0, 0, 0], [2892, 0, 302, 16, -43, 1, 53, 0, 0, 0, 0, 0], [0, -640, 0, 0, 0, 0, 0, -74, 984, 108, 104, -6], [2122, 0, -6, 168, -46, -108, -187, 0, 0, 0, 0, 0], [0, 176, 0, 0, 0, 0, 0, 539, -475, -48, -368, 48], [0, 338, 0, 0, 0, 0, 0, -392, 69, -229, 224, 47], [0, -962, 0, 0, 0, 0, 0, -556, 3114, 471, -56, 18], [1812, 0, -96, -536, -89, 505, 46, 0, 0, 0, 0, 0], [10126, 0, 1270, 80, 130, -622, 67, 0, 0, 0, 0, 0], [0, -3886, 0, 0, 0, 0, 0, -938, -2645, 27, -16, -45], [35758, 0, 466, 80, 209, 35, 575, 0, 0, 0, 0, 0], [0, -2352, 0, 0, 0, 0, 0, -1474, -8838, -8, -632, 64], [-4674, 0, 2232, -912, -240, -1518, 828, 0, 0, 0, 0, 0], [0, -2678, 0, 0, 0, 0, 0, -112, -4567, 263, 208, 851], [10158, 0, 2192, 1648, 164, -2432, 608, 0, 0, 0, 0, 0], [0, -2844, 0, 0, 0, 0, 0, 4920, 20954, -590, -288, 280], [15810, 0, -11780, 1424, 684, 968, -834, 0, 0, 0, 0, 0], [0, -2846, 0, 0, 0, 0, 0, -1319, 10153, -963, 2072, 456], [0, 4604, 0, 0, 0, 0, 0, -3099, -33727, 1538, 384, -934], [-52402, 0, -2148, 656, -364, 116, -2002, 0, 0, 0, 0, 0], [0, -3850, 0, 0, 0, 0, 0, -2668, 62290, 2259, -1640, -30], [0, -4818, 0, 0, 0, 0, 0, -1259, 50121, -4997, 2648, 2344], [12966, 0, -2084, -3328, -782, -6184, 4330, 0, 0, 0, 0, 0], [0, -23240, 0, 0, 0, 0, 0, 2480, 8966, -4132, 2320, 1292], [49474, 0, 16484, -512, -412, 1906, 4418, 0, 0, 0, 0, 0], [63038, 0, 5340, -5088, -1796, 960, -1586, 0, 0, 0, 0, 0], [-44830, 0, -32434, 672, 1003, 6921, 4009, 0, 0, 0, 0, 0], [0, -20604, 0, 0, 0, 0, 0, -4684, -10794, 2626, 6928, -1196], [0, 4486, 0, 0, 0, 0, 0, -2858, -116441, 6061, 2048, 3091], [0, -24294, 0, 0, 0, 0, 0, 6500, -20657, 1355, -5648, 173], [0, -3014, 0, 0, 0, 0, 0, -12308, 278838, -3099, 4616, 942], [-199010, 0, -28608, -672, -2662, 4140, 3284, 0, 0, 0, 0, 0], [52062, 0, 13082, -4368, -3422, -10194, 12853, 0, 0, 0, 0, 0], [-76608, 0, 40480, -2160, -3620, -13932, -4232, 0, 0, 0, 0, 0], [0, -22644, 0, 0, 0, 0, 0, 2184, -152018, -4402, 2304, -4444], [0, -42732, 0, 0, 0, 0, 0, 264, -363366, 3594, -7344, 132], [-192310, 0, -21976, 3904, 4358, -11408, -4768, 0, 0, 0, 0, 0], [2054, 0, 10736, 5104, 2494, 27424, 2308, 0, 0, 0, 0, 0], [0, -53222, 0, 0, 0, 0, 0, 21848, -83259, 7167, -8192, -2409], [0, -68394, 0, 0, 0, 0, 0, 29070, 188737, -9847, -3216, -1171], [147294, 0, 27218, 14296, -866, 10396, 6265, 0, 0, 0, 0, 0], [0, -21036, 0, 0, 0, 0, 0, 39684, 383814, 2210, -3024, -4096], [-478766, 0, 23290, -3424, -4453, -18103, 17279, 0, 0, 0, 0, 0], [-417498, 0, -95450, 4248, -3058, -12960, 2507, 0, 0, 0, 0, 0], [-277928, 0, 15852, -23632, -398, 20654, -16910, 0, 0, 0, 0, 0], [0, -36960, 0, 0, 0, 0, 0, 2796, -893910, 512, -27504, -9424], [0, 3718, 0, 0, 0, 0, 0, 17015, 4645, -28877, 27640, -98], [-824634, 0, -117200, 3936, 11200, 13032, -9920, 0, 0, 0, 0, 0], [114506, 0, -71634, 4400, 12887, -3523, 449, 0, 0, 0, 0, 0], [0, 69370, 0, 0, 0, 0, 0, -7716, 157582, -1619, 30120, 7978], [-475002, 0, 108490, -24664, -486, 200, 10605, 0, 0, 0, 0, 0], [0, 125556, 0, 0, 0, 0, 0, 36683, -508259, -7694, -12512, 2932], [0, -73924, 0, 0, 0, 0, 0, 26662, 680536, 19954, -18664, -5966], [0, 89594, 0, 0, 0, 0, 0, 8284, 659525, 5983, -5584, 5563], [1065798, 0, 40180, 4112, -1856, 662, -5486, 0, 0, 0, 0, 0], [0, 95290, 0, 0, 0, 0, 0, 41960, 928482, 2725, -1064, -7562], [0, -5592, 0, 0, 0, 0, 0, 5970, 71344, 11296, -34344, -1862], [688476, 0, 39992, -9128, -10161, 17653, 642, 0, 0, 0, 0, 0], [0, 8222, 0, 0, 0, 0, 0, 12652, -481726, -44417, 5720, 2614], [0, -216700, 0, 0, 0, 0, 0, -51497, -136527, -12438, 7376, -11904], [-562678, 0, -68546, 32024, -6362, -14632, 15895, 0, 0, 0, 0, 0], [0, 112320, 0, 0, 0, 0, 0, 48490, 764966, 1672, -13864, 23740], [-867728, 0, -11194, -5568, -11391, -51123, -783, 0, 0, 0, 0, 0], [0, -21422, 0, 0, 0, 0, 0, -70985, 1041429, -14599, 75368, 5210], [0, 68532, 0, 0, 0, 0, 0, 6028, 1087066, -41366, 21392, -22172], [-797834, 0, -15768, 85912, 13433, -22367, -3634, 0, 0, 0, 0, 0], [0, 232006, 0, 0, 0, 0, 0, -62108, 251913, -3483, 2864, -16533], [-860750, 0, -249856, 11808, 5016, -108432, -48840, 0, 0, 0, 0, 0], [0, 305164, 0, 0, 0, 0, 0, -38802, 776744, 20178, 28344, 3342], [-639010, 0, 179072, 21296, 1024, 29672, -54752, 0, 0, 0, 0, 0], [-954450, 0, -104390, 10728, -1382, -46476, -76811, 0, 0, 0, 0, 0], [-179964, 0, 173020, -11456, -14810, -44450, -62126, 0, 0, 0, 0, 0], [-175230, 0, -101372, 4368, -13720, 224664, -36886, 0, 0, 0, 0, 0], [487896, 0, 129882, -39024, -4295, 38517, 47467, 0, 0, 0, 0, 0], [0, -272248, 0, 0, 0, 0, 0, 45980, 900578, -15948, 3232, -25848], [-1747784, 0, -246220, 54608, -6612, 163304, 20970, 0, 0, 0, 0, 0], [0, 66564, 0, 0, 0, 0, 0, 49475, -655103, 10386, 27136, -30276], [-1061858, 0, -235610, -14200, 13682, -8380, -12397, 0, 0, 0, 0, 0], [0, 417496, 0, 0, 0, 0, 0, -67720, -480090, -17916, 15472, -7080], [-3000222, 0, 446138, 59368, 15386, 64108, -51451, 0, 0, 0, 0, 0], [0, -65990, 0, 0, 0, 0, 0, -99766, 1128437, -39101, -62000, 1993], [0, -329560, 0, 0, 0, 0, 0, -69343, 6541, 10056, 142432, -19086], [-2424348, 0, 30102, -78432, -27675, -187347, 14145, 0, 0, 0, 0, 0], [0, 171838, 0, 0, 0, 0, 0, 5022, 925155, -44935, -75888, 41903], [-1017584, 0, 161560, 24128, 3866, 117170, 66368, 0, 0, 0, 0, 0], [1983336, 0, -418328, -34856, -21011, 109447, -17378, 0, 0, 0, 0, 0], [0, -244858, 0, 0, 0, 0, 0, 144901, -66315, -26417, -82216, -54128], [-519594, 0, 449374, -3240, -30158, 180984, 32479, 0, 0, 0, 0, 0], [-1525772, 0, 303558, 57456, 39176, -233778, -29281, 0, 0, 0, 0, 0], [0, -544500, 0, 0, 0, 0, 0, 11519, 2166945, 70606, -29792, -8264], [2116302, 0, -489066, -128856, 14786, -243192, 79067, 0, 0, 0, 0, 0], [0, 551872, 0, 0, 0, 0, 0, -3527, -3376739, -6236, -93856, -11834], [0, -322776, 0, 0, 0, 0, 0, 21158, 1098592, 109440, 67144, -20118], [0, 12352, 0, 0, 0, 0, 0, -251789, 1017609, 70240, 18080, -5300], [-1647568, 0, -1222614, -105488, -13152, -143414, -28047, 0, 0, 0, 0, 0], [-3865754, 0, 219236, -20656, -25884, 303302, 127314, 0, 0, 0, 0, 0], [0, 450992, 0, 0, 0, 0, 0, -10166, -485250, 22376, -36808, -92992], [0, 115170, 0, 0, 0, 0, 0, -155454, -3408951, 45463, -179232, -19307], [0, -178656, 0, 0, 0, 0, 0, -184208, 2788810, 103576, 107600, 53608], [-5836290, 0, 687572, -21888, 28912, -119058, 22546, 0, 0, 0, 0, 0], [-3253182, 0, -835432, -75072, -93384, -174312, 96564, 0, 0, 0, 0, 0], [0, 394154, 0, 0, 0, 0, 0, 170901, 94953, -13943, 16200, -31400], [0, 855392, 0, 0, 0, 0, 0, -152040, -6222602, -11688, 170304, -11076], [0, -867156, 0, 0, 0, 0, 0, -227232, 2991858, -20850, 200928, 42348], [-6510264, 0, 218912, 79160, 24075, -304375, 8310, 0, 0, 0, 0, 0], [4312216, 0, -119850, -80064, 70095, -55557, -16371, 0, 0, 0, 0, 0], [-6491110, 0, 245548, -177168, -27708, -10704, 77070, 0, 0, 0, 0, 0], [0, 1668950, 0, 0, 0, 0, 0, -215980, -112239, -37435, 141952, 32387], [0, -1215086, 0, 0, 0, 0, 0, -49591, 3361657, -48907, 3688, 51824], [0, -260496, 0, 0, 0, 0, 0, -77524, -151962, 129304, -177584, 8704], [-169560, 0, 316292, -266368, 28630, 125546, 216694, 0, 0, 0, 0, 0], [5596942, 0, 596724, 115728, 42388, -103920, -203462, 0, 0, 0, 0, 0], [0, -874666, 0, 0, 0, 0, 0, 95292, -7097602, 6211, -6168, 2026], [0, 674154, 0, 0, 0, 0, 0, -5836, 4588474, -152827, -89960, -63910], [0, -1413626, 0, 0, 0, 0, 0, 28858, 7957893, 545, -228976, 44573], [131956, 0, -827296, -74840, -28821, -87359, -144210, 0, 0, 0, 0, 0], [2965090, 0, 436824, -112800, -64976, -341040, 166948, 0, 0, 0, 0, 0], [-11445790, 0, -140078, 67352, -34758, 502340, 68289, 0, 0, 0, 0, 0], [451242, 0, 682252, -172336, 63346, -221464, 47458, 0, 0, 0, 0, 0], [0, 473306, 0, 0, 0, 0, 0, -91709, 8508969, 67309, -231496, 4942], [0, 254832, 0, 0, 0, 0, 0, -44088, -2631254, 239072, -190752, -1372], [9354150, 0, 1013352, -8968, 57671, -117637, -218086, 0, 0, 0, 0, 0], [0, -820482, 0, 0, 0, 0, 0, 25192, 551625, -323335, 100688, 40223], [6645864, 0, 684704, -95296, 126678, 381794, -114084, 0, 0, 0, 0, 0], [0, -1503918, 0, 0, 0, 0, 0, 173164, -687222, 207585, -24088, 42342], [1882374, 0, -1555024, 74560, 66516, -275696, -204864, 0, 0, 0, 0, 0], [447354, 0, 1194568, -114240, -100264, 19260, 57188, 0, 0, 0, 0, 0], [0, -1111652, 0, 0, 0, 0, 0, 269730, 6369664, 18898, 164040, -62990], [0, -1195182, 0, 0, 0, 0, 0, -673024, 2570069, 77539, -163568, 72247], [0, 604236, 0, 0, 0, 0, 0, 122632, -11063130, -97618, -70384, 60224], [3473636, 0, 811282, 331136, -56272, -324274, 74477, 0, 0, 0, 0, 0], [5456640, 0, 800308, 225992, -11505, 64085, -391512, 0, 0, 0, 0, 0], [-1918702, 0, 334420, -403296, -113280, -542580, -99966, 0, 0, 0, 0, 0], [0, -340994, 0, 0, 0, 0, 0, 127897, -5177783, -171813, 296024, 111420], [0, -730922, 0, 0, 0, 0, 0, 375544, -21466909, 355425, 104336, 61353], [-1985994, 0, 494150, -11552, -96874, -567026, -439741, 0, 0, 0, 0, 0], [-10609890, 0, 911906, 424032, 29581, 3987, -488249, 0, 0, 0, 0, 0], [0, 339720, 0, 0, 0, 0, 0, 1051014, -6424092, -258144, 37896, 39690], [0, -586008, 0, 0, 0, 0, 0, -330012, 4138982, -28852, 314064, -115324], [3544728, 0, 1019112, 237008, -14894, -586030, 152776, 0, 0, 0, 0, 0], [0, 65202, 0, 0, 0, 0, 0, -8620, 13130829, 65635, -127712, 68611], [0, 98120, 0, 0, 0, 0, 0, -501856, 3210054, 362676, -482336, -32784], [-354168, 0, -698990, -193424, -4980, -96710, 109197, 0, 0, 0, 0, 0], [0, 273696, 0, 0, 0, 0, 0, -71325, -18089363, 183864, 175104, -125400], [0, 1974342, 0, 0, 0, 0, 0, -16653, -2991723, -380021, -396264, 119698], [0, 37096, 0, 0, 0, 0, 0, 291505, -13973007, 348928, 310208, 51070], [8863206, 0, 101424, -23536, 212618, -343720, 150764, 0, 0, 0, 0, 0], [13717934, 0, -245044, -162944, 182972, -249542, 52262, 0, 0, 0, 0, 0], [-6910950, 0, 1737438, -331576, 188406, -670636, -36249, 0, 0, 0, 0, 0], [0, -3153912, 0, 0, 0, 0, 0, 45588, -1574118, -67572, 194400, -136812], [14455954, 0, -365358, 280728, 176366, -571836, -490951, 0, 0, 0, 0, 0], [0, 476854, 0, 0, 0, 0, 0, -697220, -9711765, 240057, -9520, 58197], [0, 31900, 0, 0, 0, 0, 0, 449660, 4947522, 29126, -238592, -122128], [0, -2263790, 0, 0, 0, 0, 0, -244034, 14796011, 96835, 238208, 155851], [-1641358, 0, -260904, 172336, -158106, 855628, -61656, 0, 0, 0, 0, 0], [0, -2098032, 0, 0, 0, 0, 0, -767326, -287778, 109384, 309400, 384952], [0, 2299042, 0, 0, 0, 0, 0, 333898, 14116329, -456593, -779440, -41387], [3135188, 0, -1772252, 203264, 126640, -284272, 155098, 0, 0, 0, 0, 0], [0, -115386, 0, 0, 0, 0, 0, -1343676, -10817478, 112531, 515400, 98782]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_325_b_Hecke( : Kf := Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_325_6_b_f();".
// 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_b_f(:prec:=12)
    chi := MakeCharacter_325_b();
    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_325_6_b_f();".
// 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_b_f( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_325_b();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,6,sign)));
    Vf := Kernel([<2,R![2250553600, 0, 738923264, 0, 65636064, 0, 2365264, 0, 40401, 0, 326, 0, 1]>],Snew);
    return Vf;
end function;