
// Make newform 528.6.d.b in Magma, downloaded from the LMFDB on 18 June 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_528_d();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_528_d_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_528_6_d_b();".
// 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_528_6_d_b();".
// 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 := [9405993299160733691, 1216670726903935009, 71789557238409705, 3790123391809000, 58245323176592, -2750414715894, 94336579421, 10008088435, 954917352, 20989805, 3494011, 421206, -30788, 440, 15, -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, 0, 0, 0], [-1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1275772989750098141, -79582676522081273, -3896559641835784, -53218125013392, 2513599081600, -118407817147, -12035618863, -1013765214, -29423931, -4217063, -361526, 29840, -474, -17, -1, -1], [-581806593236932070619192449, -32794220457378171299292761, 246236659253209997963930, 52011280758562823389725, -24287447065399958374334, 683252995957046322047, -44705540772859479241, 3441380318765670732, 221401980296354217, -22835314933072523, 1077271611849262, -119794801999267, 10778128382622, -659357483843, 19576051193, -428015230], [-133802216083018135122755041, 13641580248361545750017009, 2283044040948983412222076, -30621687901487962048107, -473731907571542547376, -166008528720464741309, 1315892505243891637, 886562712116758722, -104833946403531615, 6901135153333967, 243690742059608, -54266495339927, 4784850426264, -386397800203, 10650642799, 108953608], [-1192510292284225823875936033, -61992563014659727204093231, -3437450732428135464009476, -148414815233546609484459, 5667033257025428035376, -164792668087308770045, -3417756259436850731, -239146849959907614, -86783452596369183, 4161507458894639, -745061594233960, 1821411390313, 4323521568120, -373050538891, 22753667887, -1531175960], [116078230597688587878088007, 3536559815657533420112468, 647404929454018222538155, 16930303343266272686145, -787423716072414217543, 31574034367589709049, -244023759359764562, 8435594458386759, 16293522279259149, -1034092607507446, 72499678624499, 1532652331531, -578055263061, 50954309729, -2671218404, 140545045], [-9838241369823683788957654, -513436269770694887493223, -41565558700148519391227, -2094854075710703282610, 74715970002952311077, 2298789929032660390, -588590501526349787, 30647757119147697, -2624751856603020, 145112316262295, -12755037160489, 257299433482, 18977179461, -4169440846, 389395639, -21354065], [-8517414984276219404999600596, -500802908134453518011989291, -44588245017464737579498817, -789177861456243927444108, 5471753025408685966583, -1665768652446650834240, 64416686636052264001, -4733089044908431857, -1522462169701323858, -9470547032526541, -1318696542783667, -299002377194504, 46693222906263, -3427912469536, 260645897131, -16368997763], [-12513373223654283772696449682, -415038856111004034558080935, -31812026566657601749386791, -2177488336947740411996718, 38023707290737665087305, 227704230417964454002, -8798907304786503011, -12255881711833652883, -477308164036713960, 38702420362352951, -9803056701790909, 272682303739102, 40675727765625, -5299213789114, 335223777535, -16846818149], [24687538349574441411701605751, 1555575705489072537133408910, 82597728419936402324079139, 1936168394506425947025153, -50642004797024328513577, -3288718761818834817881, 254041800415623857290, 11528529858914968281, 2356838378764067283, -154971390713407354, 15697407801327173, 215644202135965, -110138268818721, 7696659541205, -415155856178, 31285718521], [-82865673176101521853603165633, -5085614273129556738729603412, -298991104406231959308736175, -11214951902371683175873095, 411337359683127063495137, -6786711370077981139901, -1151206720401463163252, -25550657642394746061, -5460443855101445421, 213877900943348924, -45868402267516141, -738940622113919, 299043861439389, -21909769368331, 1425175076416, -110939190125], [75153729262148277281874405805, 3912209919109446471115230778, 255763455952735796056164389, 13583206001278924237172403, -304879351265895791662811, 4414390970435289545489, 983423842157878351466, -9134910176506437, 7779426513616327989, -296390698134101018, 42401764011935791, 103717399187627, -276607252072167, 26064655887679, -1788994665502, 112403217719], [110254714465964136802114634000, 5933708153496774024014292269, 420919007363690529597888199, 20078441187597204744156156, -472445055046212160412113, 8078254958553626231116, 67522022831367241525, 87249472921663721535, 7069361969526296442, -370470259604469337, 80343281629821125, -1028363909587508, -298367592834225, 33061661178728, -2611638724073, 174314946001], [-174349775020082912291427509047, -9662419349201509751690893069, -611185534101939793819294388, -22072680121723105644593613, 678877671150256085075132, -10719313543801652474231, -1142460698087285930381, -159120001245501937590, -7378188009489233733, 399407473366109009, -95567375588727412, -775138602126005, 630188400929064, -54547405529461, 3722581333645, -252894257120], [-203133188500836672355000605746, -12166543409111370605473320029, -730970002465822091250236245, -27839271654974447403779970, 942854840837729454096979, 4977380075189040528698, -2344884913153310989069, -88413958458441858297, -11676008843935891332, 418499275790141233, -96987335751166367, -1988596416910858, 752605144679163, -59978323237622, 4091271114857, -295393987795]];
    Rf_basisdens := [1, 1, 50031545098999707, 14147968353378432185178720, 2829593670675686437035744, 2829593670675686437035744, 144367024014065634542640, 12944161348013204195040, 4715989451126144061726240, 2829593670675686437035744, 4715989451126144061726240, 14147968353378432185178720, 14147968353378432185178720, 14147968353378432185178720, 14147968353378432185178720, 14147968353378432185178720];
    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_528_d();"
function MakeCharacter_528_d()
    N := 528;
    order := 2;
    char_gens := [463, 133, 353, 145];
    v := [1, 2, 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_528_d_Hecke();"
function MakeCharacter_528_d_Hecke(Kf)
    N := 528;
    order := 2;
    char_gens := [463, 133, 353, 145];
    char_values := [[-1, 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], [-1, 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]];
    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]];
    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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 0, -1, 0, 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, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [28, 0, 2, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0], [-1, -1, 10, -2, 0, 3, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0], [1, 1, -6, 3, -1, -5, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1], [267, 1, -5, -3, 5, -1, 2, 1, 1, 1, 0, 2, 1, 0, -2, 1], [3, 3, -22, -11, 1, -5, 0, 0, 2, -1, 0, 3, 0, -3, 0, 1], [-6, -6, 61, -2, -6, 5, 6, 0, -1, 2, 0, 1, 0, 3, 0, -3], [2197, -3, -42, 1, 4, 0, 4, 4, 1, 1, -6, 2, 1, -3, -2, -2], [-22, -22, 115, -45, 13, 71, -5, 0, 4, 4, 0, 1, 0, 5, 0, 2], [-6, -6, 38, -28, -17, -50, 4, 0, -2, -2, 0, -3, 0, -5, 0, 4], [1152, 6, 15, -1, 30, -7, 7, 5, -4, -4, -2, 0, 0, 0, 6, -4], [-20, -20, 135, -62, -12, -72, 3, 0, -6, -4, 0, -5, 0, -2, 0, -3], [-3715, 9, 56, -21, 43, -16, -1, -4, 0, 0, 22, -13, -5, 9, 4, 9], [5866, -28, -366, -18, 5, 5, 8, -13, 0, 0, 10, 15, -9, 11, -12, 11], [26, 26, -138, 15, -33, -338, 10, 0, 0, -19, 0, -4, 0, -5, 0, -10], [8097, 29, 136, 5, 52, -2, 30, -11, -9, -9, -26, 22, -1, -5, 2, -14], [3966, -102, -950, 40, -29, 17, 6, 10, -16, -16, -30, -1, -17, -7, 16, -23], [27, 27, -89, -22, -50, -435, 23, 0, -9, -19, 0, 2, 0, -17, 0, -13], [-2846, -63, -468, -9, 11, -6, 12, -7, 22, 22, -25, 28, 44, -22, -25, 0], [-154, -154, 1368, -147, -19, -100, 21, 0, -1, -23, 0, 2, 0, 18, 0, -44], [-15263, -282, -2223, 7, -24, -17, -34, 19, 16, 16, 11, -33, 33, -15, 9, 1], [-235, -235, 1828, -72, -78, -565, -27, 0, 4, 1, 0, -39, 0, -50, 0, 94], [-91, -91, 570, -91, -20, -673, 16, 0, -28, 69, 0, -2, 0, -12, 0, 55], [-7620, 20, -228, 17, -185, 76, 3, 48, 6, 6, -26, -38, -124, 7, -52, 13], [-8092, -416, -3290, 29, -11, -28, -59, 9, -12, -12, 42, -36, 48, 3, 60, -9], [-432, -432, 3446, -251, 95, 464, -35, 0, 57, 51, 0, 48, 0, -14, 0, 74], [-153, -153, 1291, -295, 117, -31, 4, 0, -29, -7, 0, 26, 0, 44, 0, -106], [-37236, 211, 2920, 162, -484, 74, -199, 133, -8, -8, 45, -100, 34, -9, 79, -17], [-604, -604, 5576, -445, 211, 976, -67, 0, 23, -61, 0, 92, 0, -84, 0, -46], [144, 144, -724, 535, 172, -1470, -33, 0, -104, 36, 0, -9, 0, 20, 0, -79], [-605, -605, 7714, 1166, -168, -579, 147, 0, 4, -61, 0, 101, 0, -72, 0, -86], [510, 510, -3187, -26, -43, -82, -23, 0, 34, -146, 0, 134, 0, -323, 0, 77], [69439, -1037, -8877, 14, -45, 18, 17, -130, 21, 21, -52, 175, 170, -30, -34, -9], [-160, -160, -689, -756, 337, -935, -458, 0, -22, -146, 0, -244, 0, -113, 0, 189], [-73130, -296, -3586, 139, 175, 18, 103, 14, -126, -126, -116, -228, -354, 5, 126, -121], [-1159, -1159, 10362, 1291, 155, -1047, -254, 0, -6, -111, 0, -239, 0, 119, 0, 3], [-139695, -477, -2003, 236, -396, -58, -320, 456, 26, 26, 58, -24, 450, -96, 198, -70], [46473, -1199, -10507, 382, -531, 132, -251, 172, -239, -239, 108, -443, -436, 112, 362, -127], [-63947, -129, -3016, -620, 1286, -267, 457, -431, 153, 153, 10, 415, 206, 19, -334, 172], [30208, -1024, -8546, 17, 134, -39, 5, -236, -42, -42, 20, 195, 213, 16, 72, -26], [-1729, -1729, 16028, 1153, -217, 3007, -22, 0, -212, -33, 0, -269, 0, 65, 0, -41], [251, 251, -1648, 973, -880, 2389, 284, 0, -96, -129, 0, -306, 0, 204, 0, -123], [91, 91, 572, -202, -218, 2935, 330, 0, -179, 103, 0, 153, 0, -43, 0, -186], [-366, -366, 1069, 440, -908, 7027, 290, 0, 369, 232, 0, -167, 0, 375, 0, 393], [-81384, -640, -8516, 263, -161, 398, 373, -784, -358, -358, -278, 364, -598, 191, 56, -167], [-23919, -1327, -14344, -375, -760, 282, 54, 320, 299, 299, 22, 0, -363, 27, -630, 326], [-332, -332, 2761, -12, -280, -467, 366, 0, 294, -46, 0, 71, 0, 604, 0, -427], [-279906, -448, -4806, -604, 2098, -584, 504, -582, 138, 138, -38, -146, 32, -98, -118, 40], [133488, 310, -1940, -231, 1290, -159, 471, 390, -214, -214, -26, 49, -421, 158, 86, -56], [-350491, 489, 5549, 471, -584, 57, -363, 498, -190, -190, 82, -601, -311, 16, 430, -174], [379, 379, -6286, -1774, -763, -4725, 622, 0, 135, 821, 0, 280, 0, 56, 0, 620], [-417520, -32, 4018, 289, 891, -474, -59, -126, 40, 40, -270, -296, 608, -371, 392, -331], [23, 23, 173, -2582, 749, 781, -673, 0, -429, -511, 0, -7, 0, -1012, 0, 79], [1114, 1114, -7813, 1887, -1624, -378, -88, 0, -644, -806, 0, -1014, 0, -416, 0, -20], [28236, 4, 1016, -1274, 2757, -933, 520, -1103, 538, 538, 216, -149, 437, -173, -514, 365], [677, 677, -17490, -10245, 97, 7375, -274, 0, -28, 115, 0, -101, 0, -277, 0, 465], [-1601, -1601, 14398, 1154, 1458, 1661, 270, 0, 501, 1167, 0, 995, 0, 509, 0, 164], [-361, -361, 7752, -784, 1446, 8049, 225, 0, -80, 131, 0, 991, 0, -166, 0, -774], [316, 316, 248, 1409, 1330, -11302, -879, 0, 562, -582, 0, 419, 0, -704, 0, 265], [-389570, 1510, 8238, 865, -2507, 1192, -13, 505, -580, -580, -272, 708, -876, 405, 78, -175], [70203, 5593, 55863, 718, -1745, 93, -908, 1272, 78, 78, 112, -63, 975, -223, 402, -145], [-418, -418, -5660, -2582, 2872, -1943, -490, 0, 612, 1276, 0, 512, 0, 1480, 0, -104], [1115, 1115, -16691, 3386, -156, -20708, -1138, 0, -868, 68, 0, -1914, 0, 528, 0, 586], [-269676, 7206, 66380, 918, -1775, 481, -806, -32, -728, -728, 616, -385, -605, 545, 982, -183], [-1071226, -559, 7128, 216, -1102, -350, -725, -431, 880, 880, -371, -438, 1536, -899, -333, -19], [300626, 3376, 26896, 992, -5110, 1912, -432, -207, -258, -258, -302, 86, -1772, 378, -542, 120], [7859, 7859, -77486, -7133, -2838, 81, 511, 0, -542, -1300, 0, -1404, 0, 450, 0, -888], [-1164334, -1828, -15166, 1059, -5305, 1342, -1529, 2208, -218, -218, 688, 780, 498, 469, 186, 251], [1474, 1474, -9569, 8056, 596, 1537, -908, 0, 751, -50, 0, -137, 0, -195, 0, 1033], [116382, 2132, 8698, -1044, 7182, -1756, 2072, 2293, 26, 26, -1054, 740, 1030, -606, 106, -580], [-189, -189, -11175, -9300, 2604, -35380, -132, 0, 1140, 1042, 0, 1108, 0, 1264, 0, -190], [-1346401, -2013, -17781, 150, -1127, 568, 529, -793, 457, 457, -1136, 743, 190, -544, -962, -87], [3225, 3225, -25642, -5278, -1471, -8836, 1430, 0, -279, 25, 0, 882, 0, -654, 0, -482], [-358768, 2102, 9207, -2809, 5959, -1894, 697, 2098, 326, 326, 1786, 589, 1103, 683, -232, 1009], [11186, 11186, -87892, 16990, 1492, -10348, -380, 0, -650, -78, 0, -804, 0, 1690, 0, -1614], [-129986, 11136, 91770, -1746, 5688, -750, 2202, -4626, -420, -420, -36, 804, -1248, 600, -396, 180], [-1258318, -2836, -34867, -387, 1349, 530, 965, -2678, -1170, -1170, 592, 1731, -1047, 1283, 366, 113], [205986, 3378, 44214, 302, -2180, 94, -1380, -3232, 20, 20, 1058, -712, 304, 270, 478, 290], [-1282820, 5952, 48650, 1031, 791, 316, 867, 926, -716, -716, -1182, 1990, 962, -155, 560, -871], [610337, 14143, 106971, -1688, 2669, 475, 2540, 68, 172, 172, -1024, 2303, -977, 265, -1898, 437], [-1427, -1427, 32561, 12172, 1540, 23309, 1265, 0, -1045, 2739, 0, 2266, 0, -1507, 0, 935], [-1496211, -6185, -63188, -2452, 3665, -205, 1954, -5294, 236, 236, 262, 1478, -950, 679, -1568, 915], [16128, 16128, -134186, 7169, 8045, -4162, -4233, 0, -747, -1083, 0, 646, 0, -2460, 0, -16], [128484, 12722, 111908, -1096, 8966, -2698, 1624, -230, -140, -140, -388, -2100, -456, -570, 1032, -710], [-679, -679, 2182, -16883, -7967, 26603, 2852, 0, 594, -1559, 0, 161, 0, -1991, 0, 865], [3892, 3892, -38287, 1060, -2402, -2547, -118, 0, 895, -1698, 0, -1419, 0, 1095, 0, -479], [-1500419, 5457, 45462, -1240, 12743, -3537, 3086, 698, 38, 38, -1884, 1462, 3332, -1419, 878, -1381], [-2114130, -568, -9842, -51, 2839, -380, 1237, -2000, -286, -286, -900, -2474, -3112, -219, 110, -505], [-1946, -1946, 20997, -10672, -3066, -25571, 2092, 0, -2393, -1060, 0, -389, 0, -497, 0, -2567], [-1438540, -3516, -40990, -508, 4432, -680, 1860, 1216, -196, -196, -1156, 2702, 1834, -312, -140, -508], [-152, -152, 16899, 16778, -7255, 10461, 2526, 0, -1072, -250, 0, -1970, 0, 665, 0, -17], [-2791026, -8826, -80102, -1036, -1530, -136, -446, 3516, 1598, 1598, -116, -954, 432, -804, -1704, 794], [-11179, -11179, 102850, 776, 1825, 47986, -678, 0, -2345, -843, 0, -1352, 0, 828, 0, -2664], [6497, 6497, -32444, 15613, 4370, 4443, 1173, 0, 2860, 1322, 0, 4502, 0, 572, 0, -892], [-7368, -7368, 33816, -13829, -576, -61740, 73, 0, 2774, 2406, 0, 211, 0, 1922, 0, 3047], [178708, -23026, -208522, 2160, 9268, -1528, 3182, -3609, -2180, -2180, -3162, 2044, 1220, -830, 2858, -3010], [-8489, -8489, 101178, 10158, -5830, 67723, 2056, 0, 569, -3657, 0, -509, 0, -131, 0, -2448], [-13867, -13867, 121276, 5406, -5592, -106573, 1959, 0, 3240, 393, 0, 1, 0, 1564, 0, 2068], [-2730964, 11126, 71778, -6312, 11444, -3336, 3090, 6978, 2564, 2564, 658, 546, 1290, -498, -3474, 2066], [923, 923, -46420, -29563, 11023, -73565, -4558, 0, -474, 1527, 0, 955, 0, -477, 0, 575], [7828, 7828, -13634, 43900, 3401, 24578, -2714, 0, 786, -4094, 0, 441, 0, -2123, 0, -1626], [-63615, 5322, 28432, -4602, -7213, 3141, 1311, -387, 3166, 3166, 125, 6034, 1070, 512, -7231, 3678], [-2834008, -2904, -6542, 4145, -4562, 493, -2493, 714, -1294, -1294, -358, -1939, 535, -474, 3178, -1768], [-4507, -4507, 38680, 1779, -16127, 91685, 8950, 0, 698, 4517, 0, 153, 0, 2165, 0, 2897], [-4742558, 17442, 177122, 4075, -21859, 5678, -5859, -2865, -560, -560, 2344, -3506, -5014, 1689, 86, 1129], [-888376, -6510, -70760, -1068, -1119, 863, 1424, 1200, 1360, 1360, -1716, -1155, -2607, -835, -2766, 525], [17754, 17754, -160371, 2016, 477, 44692, -2997, 0, -756, -3550, 0, -2764, 0, -745, 0, -797], [1506338, -23072, -173698, 7300, -23143, 4763, -7890, 3815, -924, -924, 1514, -5011, -2159, 275, 2812, -649], [5395, 5395, 12354, 19266, -8969, 37723, 5556, 0, 1533, -647, 0, 5174, 0, -6672, 0, 2384], [-14274, -14274, 81486, -30709, 13473, 88930, -5764, 0, -1672, 2683, 0, 178, 0, -83, 0, 916], [-2650, -2650, 34743, 33648, 15698, -21877, -5850, 0, -583, 2090, 0, -147, 0, 3709, 0, -2055], [-5645, -5645, -15108, -39801, 3880, 107281, -3855, 0, 3996, -1364, 0, -1672, 0, 3510, 0, 794], [13308, 13308, -201208, -48267, 4349, 90806, -4836, 0, -3052, -5, 0, -5864, 0, 3353, 0, -546], [-1557899, 12661, 127017, 2184, -13103, 4920, -1179, -8751, -677, -677, -328, 7413, 2418, 1254, -1482, 577], [-42606, -42606, 336884, -27378, -1842, -33999, -7592, 0, -6066, -7516, 0, -10766, 0, -1560, 0, -1256], [1246758, 7752, 55328, 3566, -8724, 4626, 3068, 4754, 832, 832, -7466, 10716, 5712, -2690, -3750, -1858], [2421363, -36795, -359283, -1584, 16949, -3738, 4677, 2948, -1463, -1463, -1630, -839, -1492, -286, 1868, -1749], [675650, 4882, 63664, -6870, 19718, -8612, -680, 1068, 1760, 1760, 5790, -808, 8308, 176, 1918, 1936], [-38525, -38525, 290854, -56474, -9468, 8355, 6725, 0, 4128, 3711, 0, 3213, 0, 1684, 0, 2942], [-1239374, 6556, 104891, -1149, -15677, 2822, -5737, -14714, 1826, 1826, 5060, -3327, -2205, 1793, -2178, 3619], [4002, 4002, -49420, 1593, 6471, 131360, -2612, 0, 3966, 2337, 0, 2384, 0, 445, 0, 3474], [-50933, -50933, 451196, -19884, 13590, -64359, -1353, 0, -4072, 2759, 0, 3003, 0, 806, 0, -5122], [-996287, -34755, -223952, 1893, -11196, -2778, -10902, -1976, 2511, 2511, 6498, -8040, 6705, -1065, 3606, 1446], [-1998825, 22487, 233264, 625, -482, 64, 470, -12943, 751, 751, -1846, 34, 803, -1303, -742, -552], [-25186, -25186, 138907, -76766, 8438, 146559, 384, 0, 7393, 6476, 0, 7559, 0, 1481, 0, 4829], [1566174, -39826, -379602, -12629, 18245, -5876, 4397, -719, 5538, 5538, 2694, -84, 1938, -543, -7296, 4995], [27991, 27991, -251654, -22120, -1538, -87687, 7078, 0, 2769, 6413, 0, 8225, 0, -1063, 0, 2020], [-2161600, -34176, -324836, -4074, -7664, 3922, 2422, -4518, 3100, 3100, -1448, 7202, 742, 116, -7880, 3216], [-41668, -41668, 282991, -85238, -8100, 34805, -2528, 0, -2045, -8754, 0, -8297, 0, 1393, 0, -3895], [1680046, -20872, -121220, 8974, -29078, 5508, -7238, 978, 3584, 3584, -5320, -6440, 608, -5318, -1852, -1734], [-11683, -11683, 183120, 75422, -464, -18093, 5167, 0, 1378, 5333, 0, 4133, 0, 2982, 0, -404], [-150078, 8634, 35342, -9620, 41123, -10427, 11042, -1948, 1136, 1136, -2558, -1901, -637, -1879, -1072, -743], [-7879, -7879, 169201, 52530, 7495, 173179, -4013, 0, -19, -3661, 0, 5505, 0, -11560, 0, 2375], [-24302, -24302, 184824, 7948, -34291, 15168, 13718, 0, 90, 3524, 0, -8811, 0, 10857, 0, 1568], [-4323, -4323, 143298, 8722, 2757, -69786, 2626, 0, 1741, -4987, 0, 12206, 0, -14662, 0, -790], [18030, 18030, -144075, 9891, 6099, 68181, -10815, 0, 2926, -8576, 0, -1171, 0, -10263, 0, 5784], [-48220, -48220, 433130, 38732, -5563, -278868, -6120, 0, -5476, -2612, 0, -11071, 0, -1137, 0, 4120], [-14333, -14333, 130924, 9257, -125, -199461, -338, 0, 6000, -365, 0, 2155, 0, 889, 0, 2591], [32114, 32114, -251563, 36744, -15438, -94565, -826, 0, 3653, -6562, 0, -3765, 0, -5907, 0, 6763], [4857782, 68003, 612350, -5972, 14462, -2406, 5713, -19693, 760, 760, -501, 2772, -1050, 515, -3051, 1275], [328547, -23761, -196078, 1009, 4806, -1904, -1942, -9482, -3289, -3289, 4222, -5734, -4517, 2629, 5542, -660], [2060019, -13095, -117127, -2233, -2877, -1751, -1926, 21339, 5139, 5139, -980, 5352, 12621, -3592, -4074, 1547], [101700, -9404, -140738, -3346, 16339, -1547, 11148, 7919, 3250, 3250, -11052, 4971, 621, -5251, -7050, -2001], [23600, 23600, -108959, 42452, -35900, 179077, 22686, 0, -12262, 766, 0, -2985, 0, 3180, 0, -11691], [-24741, -24741, 163597, -78824, 37124, 34512, -2236, 0, -2588, 8102, 0, 11276, 0, 7512, 0, -13274], [1536426, 49296, 349580, 5060, 28611, -369, 16910, 383, -6890, -6890, -15080, 5427, -8871, -2243, 3186, -9133], [210404, -1676, 50716, 4821, -6106, -2819, -7073, 12135, 1646, 1646, 606, 6629, 19963, -3442, 4198, -1796], [37523, 37523, -320016, 3811, -13122, 33979, 5927, 0, -2842, -1180, 0, -2190, 0, 270, 0, -2102], [-33223, -33223, 250548, -40065, 10974, -170603, -3944, 0, 14518, 601, 0, 9008, 0, -412, 0, 6523], [3522770, -16174, -208554, -5812, 31166, -4800, 12734, -4206, -1050, -1050, -5872, 3630, -3384, -920, -1932, -1970], [87817, 87817, -869876, -55505, -9336, 31725, -5758, 0, -6148, -10451, 0, -14250, 0, 1500, 0, -3849], [-1210200, 4558, -20487, -4915, 18704, -7147, -2915, 23349, -4276, -4276, 12106, -14890, -10970, 6142, 8374, 1866], [-37988, -37988, 332965, -30328, -233, -362270, 1327, 0, -3042, -4196, 0, -1112, 0, 1603, 0, -7729], [38469, 38469, -523700, -108716, 19315, 51013, -15836, 0, -1345, -4913, 0, -10640, 0, 7578, 0, -3196], [-8223058, 36306, 270466, 7419, -16827, 6156, -3885, 15070, -5190, -5190, 1656, -20748, -26610, 3591, 4854, -1599], [-2207, -2207, -5248, 16125, -14111, -40943, 9766, 0, -830, 11473, 0, -1825, 0, 8241, 0, 4227], [10859901, -39385, -379385, -16664, 52528, -14568, 15718, -8226, 7976, 7976, -7030, -158, 5654, -6962, -9058, 1014], [39884, 39884, -340693, -15497, 18889, -190155, -14135, 0, -14590, -13652, 0, -8617, 0, -6737, 0, -12888], [24983, 24983, -134899, 135612, -15166, -48411, -1817, 0, 1469, 1569, 0, -6954, 0, -3423, 0, 13415], [13076751, -62101, -419080, 17980, -69719, 14863, -19936, -9388, 2464, 2464, -508, -8996, -1072, -2851, 266, -387], [82151, 82151, -763722, -65869, -1516, 200711, 5345, 0, 10058, 1494, 0, 12314, 0, -5396, 0, 4634], [-878561, 55379, 514747, 364, -11019, -1574, -6865, 19791, 5417, 5417, 1084, -20599, -8264, -3896, -1958, 1521], [-44699, -44699, 293002, -89141, 4162, -386191, 3624, 0, 15932, 13205, 0, 14366, 0, -1390, 0, 16161], [-3846502, 63552, 538512, 13997, -924, 8745, 7871, -27681, -13652, -13652, -8216, 6189, -15039, 4612, 9864, -9040]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_528_d_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_528_6_d_b();".
// 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_528_6_d_b(:prec:=16)
    chi := MakeCharacter_528_d();
    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_528_6_d_b();".
// 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_528_6_d_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_528_d();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,6,sign)));
    Vf := Kernel([<5,R![152380233053219127711744, 0, 40403311015567864953600, 0, 2702787815214783205632, 0, 4868938441307449376, 0, 3577095282352520, 0, 1349414221499, 0, 271756675, 0, 27097, 0, 1]>,<23,R![-17609336714763284600115072, 54443135511799986455856, 61354541289289880016, -299316230718362440, 178250549848280, 50650389647, -27004565, -2123, 1]>],Snew);
    return Vf;
end function;