
// Make newform 1568.4.a.bm in Magma, downloaded from the LMFDB on 14 June 2026.
// To make the character of type GrpDrchElt, type "MakeCharacter_1568_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_1568_4_a_bm();".
// 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_1568_4_a_bm();".
// 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 := [-95032, 10832, 107292, -6576, -36090, 572, 3241, -12, -104, 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], [-477686356, 355208796, 277917868, -207373036, -28114713, 20684493, 982522, -691990, -10397, 6789], [-5448833068, 3324863064, 3208928356, -1914642292, -325314063, 190741842, 11318470, -6385342, -118295, 62712], [-1227376948, 1621903336, 680163868, -975169616, -70073933, 97731024, 2570032, -3272798, -29011, 32090], [464722720, -356443428, -277300552, 207373036, 28114713, -20684493, -982522, 691990, 10397, -6789], [-15419497828, 16560677548, 8697663964, -10213950212, -894366245, 1031219493, 32401990, -34688642, -358741, 340985], [8264477956, -11938485124, -4520736964, 7150322744, 468411617, -717749349, -17385103, 24068813, 198892, -236162], [7942873120, -12445865080, -4280326852, 7474458176, 446305703, -751381530, -16779982, 25228040, 194707, -247694], [-34572972728, 17081803124, 20787965924, -9627172396, -2117779522, 955929189, 73369526, -31987936, -757532, 314395], [-19870370324, 38353582664, 10423441676, -23388093508, -1094932969, 2351523738, 42235202, -78877510, -507425, 773800]];
    Rf_basisdens := [1, 1234632, 3703896, 1587384, 308658, 11111688, 5555844, 5555844, 5555844, 11111688];
    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_1568_a();"
function MakeCharacter_1568_a()
    N := 1568;
    order := 1;
    char_gens := [1471, 197, 1473];
    v := [1, 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_1568_a_Hecke( : Kf := Kf)
    return MakeCharacter_1568_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 := 4;
    raw_aps := [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 0, 0, 0, 0, 0], [0, -1, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [4, 0, 0, 0, 0, 0, 0, 0, -1, 0], [0, -2, 1, 0, 0, -1, 0, 0, 0, 0], [0, -1, -3, 1, 0, 1, 0, 0, 0, -1], [0, 2, 2, 2, 0, -1, 0, 0, 0, -2], [31, 0, 0, 0, 2, 0, 0, 3, 1, 0], [-38, 0, 0, 0, 0, 0, -5, 2, -2, 0], [0, -7, 6, 2, 0, -1, 0, 0, 0, 2], [-36, 0, 0, 0, -6, 0, 5, -4, 0, 0], [0, -28, -5, 1, 0, 2, 0, 0, 0, 1], [78, 0, 0, 0, 0, 0, 4, -6, -5, 0], [0, -2, 16, -8, 0, 4, 0, 0, 0, 0], [-98, 0, 0, 0, -6, 0, 8, 4, 4, 0], [0, -1, 2, 28, 0, 4, 0, 0, 0, -2], [0, -21, 21, 12, 0, -2, 0, 0, 0, -6], [241, 0, 0, 0, -4, 0, 10, -11, 5, 0], [-146, 0, 0, 0, -12, 0, -8, -2, 4, 0], [0, -59, -37, 5, 0, -3, 0, 0, 0, -9], [410, 0, 0, 0, -16, 0, 20, -6, 0, 0], [0, -64, -20, -14, 0, 5, 0, 0, 0, -12], [0, 5, -44, -21, 0, -7, 0, 0, 0, 8], [0, -95, 22, 23, 0, -9, 0, 0, 0, 8], [0, -108, 9, 34, 0, 15, 0, 0, 0, -10], [0, 111, -26, -58, 0, -15, 0, 0, 0, 2], [771, 0, 0, 0, 0, 0, -30, -17, 15, 0], [-298, 0, 0, 0, 10, 0, -1, 30, -22, 0], [184, 0, 0, 0, 7, 0, -28, 26, -30, 0], [325, 0, 0, 0, 14, 0, -24, 41, -31, 0], [0, -28, -52, -58, 0, 7, 0, 0, 0, -28], [396, 0, 0, 0, -32, 0, 2, -4, -28, 0], [0, -142, -66, -94, 0, -21, 0, 0, 0, 18], [-96, 0, 0, 0, 0, 0, -4, 30, -34, 0], [1235, 0, 0, 0, 6, 0, -12, -1, 43, 0], [0, 148, 29, 56, 0, -17, 0, 0, 0, -6], [1888, 0, 0, 0, -4, 0, -44, 4, -7, 0], [0, 256, -92, -124, 0, 30, 0, 0, 0, -4], [0, 184, -59, 84, 0, -33, 0, 0, 0, -10], [1155, 0, 0, 0, -36, 0, 38, 31, 19, 0], [0, 149, 103, -154, 0, 0, 0, 0, 0, -4], [2790, 0, 0, 0, -28, 0, 48, -42, -20, 0], [714, 0, 0, 0, -7, 0, -56, 36, 36, 0], [-752, 0, 0, 0, -26, 0, 68, -46, -30, 0], [0, -117, -42, 310, 0, -15, 0, 0, 0, 2], [241, 0, 0, 0, -32, 0, -18, 5, -23, 0], [0, 427, 74, -54, 0, -41, 0, 0, 0, -50], [0, -412, 150, 370, 0, 3, 0, 0, 0, 10], [0, 8, 7, 32, 0, 15, 0, 0, 0, 48], [1154, 0, 0, 0, -20, 0, 24, -118, 2, 0], [43, 0, 0, 0, -106, 0, 84, -129, 37, 0], [0, 463, 30, -175, 0, 25, 0, 0, 0, -20], [0, 32, 208, -134, 0, -11, 0, 0, 0, -48], [0, 96, 292, -65, 0, -8, 0, 0, 0, -20], [1512, 0, 0, 0, -16, 0, -8, 80, -38, 0], [0, 258, -145, 36, 0, 15, 0, 0, 0, 74], [0, -193, 54, -294, 0, -5, 0, 0, 0, 18], [-3200, 0, 0, 0, -76, 0, 4, -126, -62, 0], [2190, 0, 0, 0, -52, 0, 36, 6, -82, 0], [0, 229, 64, 268, 0, -42, 0, 0, 0, 64], [0, 612, 49, -298, 0, -29, 0, 0, 0, -102], [0, -84, 32, -50, 0, 55, 0, 0, 0, -16], [0, -878, 208, 324, 0, 18, 0, 0, 0, 48], [0, -88, 3, -343, 0, 30, 0, 0, 0, 49], [-2074, 0, 0, 0, -74, 0, 48, -40, -136, 0], [2558, 0, 0, 0, 0, 0, -12, 90, -73, 0], [2686, 0, 0, 0, 29, 0, -92, -82, -42, 0], [-662, 0, 0, 0, 12, 0, -136, 230, 63, 0], [0, 467, -261, -470, 0, 50, 0, 0, 0, -20], [0, -404, 111, -377, 0, -36, 0, 0, 0, -69], [1827, 0, 0, 0, -50, 0, -4, -81, -173, 0], [0, 413, -302, 6, 0, 125, 0, 0, 0, 38], [1444, 0, 0, 0, 0, 0, 164, -14, 50, 0], [2090, 0, 0, 0, 44, 0, 72, 14, 105, 0], [0, -484, 392, 12, 0, -66, 0, 0, 0, -8], [-2446, 0, 0, 0, 210, 0, -23, -22, 62, 0], [0, 309, 75, 314, 0, 2, 0, 0, 0, 118], [478, 0, 0, 0, -11, 0, 206, -50, 254, 0], [0, -328, -586, -179, 0, -6, 0, 0, 0, 20], [0, 15, 52, -300, 0, -186, 0, 0, 0, 172], [-4072, 0, 0, 0, 140, 0, -300, 170, 42, 0], [-2927, 0, 0, 0, 178, 0, -260, 397, 47, 0], [0, -111, 21, 881, 0, 95, 0, 0, 0, -37], [0, -361, -470, 26, 0, -153, 0, 0, 0, -2], [-1289, 0, 0, 0, -60, 0, 166, -349, 87, 0], [1206, 0, 0, 0, -96, 0, -240, 72, 168, 0], [3768, 0, 0, 0, -107, 0, 180, -78, -214, 0], [0, 805, -525, -438, 0, -72, 0, 0, 0, -128], [2956, 0, 0, 0, -108, 0, 452, -180, 168, 0], [0, -224, 566, 142, 0, -7, 0, 0, 0, 154], [0, 1103, 222, -154, 0, -167, 0, 0, 0, -150], [2409, 0, 0, 0, 62, 0, 96, -43, -221, 0], [-3949, 0, 0, 0, -160, 0, 106, -129, -9, 0], [-2625, 0, 0, 0, -36, 0, 230, -69, -205, 0], [0, -851, -198, 326, 0, -139, 0, 0, 0, -194], [0, -1061, 163, 182, 0, 160, 0, 0, 0, 118], [0, -1060, 346, -327, 0, 138, 0, 0, 0, 156], [0, 753, -174, -52, 0, -28, 0, 0, 0, 222], [-2010, 0, 0, 0, -20, 0, 328, -492, 68, 0], [1900, 0, 0, 0, 140, 0, -388, 56, -29, 0], [-7732, 0, 0, 0, 130, 0, 44, 262, -42, 0], [0, -1319, 162, -848, 0, 142, 0, 0, 0, -2], [8170, 0, 0, 0, -25, 0, 306, -70, 74, 0], [2850, 0, 0, 0, 292, 0, -64, -138, 117, 0], [0, 2170, -1051, -795, 0, -54, 0, 0, 0, -71], [0, 1124, -22, 118, 0, 265, 0, 0, 0, -26], [0, -10, 40, -175, 0, 170, 0, 0, 0, 228], [-12222, 0, 0, 0, -348, 0, 232, -54, 194, 0], [0, 1679, -704, 293, 0, 3, 0, 0, 0, 212], [0, 938, -368, 604, 0, 254, 0, 0, 0, -80], [560, 0, 0, 0, 456, 0, -345, 112, -84, 0], [7306, 0, 0, 0, 279, 0, -164, 474, 146, 0], [0, 2771, -280, -1412, 0, 6, 0, 0, 0, -168], [1412, 0, 0, 0, 180, 0, -220, -68, 86, 0], [798, 0, 0, 0, 55, 0, -238, -66, 462, 0], [0, -1665, 734, 1380, 0, -12, 0, 0, 0, -46], [0, -1787, -202, -1126, 0, -141, 0, 0, 0, -30], [-8124, 0, 0, 0, -108, 0, 149, -76, 88, 0], [-6832, 0, 0, 0, -268, 0, -148, -164, -141, 0], [0, 510, 481, 890, 0, 227, 0, 0, 0, -4], [-718, 0, 0, 0, -464, 0, 406, -550, -166, 0], [0, 2323, -215, -486, 0, 110, 0, 0, 0, -26], [-5071, 0, 0, 0, 540, 0, -14, 69, -79, 0], [0, -638, 472, 90, 0, -155, 0, 0, 0, 24], [-11566, 0, 0, 0, -412, 0, 361, -390, 446, 0], [6016, 0, 0, 0, -286, 0, 261, -144, -492, 0], [0, -442, -300, 1312, 0, -188, 0, 0, 0, -196], [0, 274, -296, 1488, 0, -112, 0, 0, 0, 40], [0, 675, -227, 892, 0, -132, 0, 0, 0, -220], [448, 0, 0, 0, -436, 0, 468, -140, -179, 0], [691, 0, 0, 0, 414, 0, -180, -97, 43, 0], [-9819, 0, 0, 0, -142, 0, 452, -175, 27, 0], [-2296, 0, 0, 0, -228, 0, -29, 584, 68, 0], [0, 1402, 229, 95, 0, -8, 0, 0, 0, -269], [0, 1931, -758, 581, 0, -87, 0, 0, 0, 68], [0, 451, -489, 628, 0, 16, 0, 0, 0, 514], [0, 344, -1034, -1746, 0, -79, 0, 0, 0, -214], [0, 2960, -21, 736, 0, -11, 0, 0, 0, 62], [3792, 0, 0, 0, 15, 0, -676, 182, -482, 0], [0, 457, -408, 2252, 0, -354, 0, 0, 0, -136], [6042, 0, 0, 0, -204, 0, 232, -220, 372, 0], [12020, 0, 0, 0, 764, 0, -236, 308, 472, 0], [-5705, 0, 0, 0, -452, 0, 438, -189, 183, 0], [0, -369, 457, -1028, 0, -38, 0, 0, 0, -202], [0, 139, -926, -626, 0, 441, 0, 0, 0, 102], [0, -724, 233, -1168, 0, -221, 0, 0, 0, 554], [0, 1408, -506, 1019, 0, 134, 0, 0, 0, 32], [0, -472, 392, -354, 0, 287, 0, 0, 0, 216], [-3740, 0, 0, 0, 40, 0, 192, -180, -422, 0], [-1150, 0, 0, 0, 446, 0, -55, 26, 158, 0], [0, 894, 717, -335, 0, -166, 0, 0, 0, 229], [601, 0, 0, 0, -296, 0, -354, 397, -327, 0], [0, 1942, -1332, 904, 0, -32, 0, 0, 0, 228], [15545, 0, 0, 0, 112, 0, 318, 205, 457, 0], [-6933, 0, 0, 0, 58, 0, 320, 23, -221, 0], [7532, 0, 0, 0, -100, 0, 804, -900, 268, 0], [0, -2929, 597, 1905, 0, -231, 0, 0, 0, -193], [0, 453, 1979, -1083, 0, -67, 0, 0, 0, -25], [0, -570, -1455, -1414, 0, 89, 0, 0, 0, -426], [-2912, 0, 0, 0, -100, 0, -476, 172, 67, 0], [-4158, 0, 0, 0, -770, 0, -16, -856, 344, 0], [22771, 0, 0, 0, 514, 0, -104, 55, -407, 0], [0, 803, -342, -348, 0, -336, 0, 0, 0, -74], [-10434, 0, 0, 0, -48, 0, 994, -426, 166, 0], [0, 1241, -1790, 466, 0, 147, 0, 0, 0, 374], [14138, 0, 0, 0, -516, 0, -40, 498, -482, 0], [0, 1489, 475, 1256, 0, -330, 0, 0, 0, 14], [-10394, 0, 0, 0, 607, 0, -520, 252, 316, 0], [0, 2614, -1495, -1592, 0, -253, 0, 0, 0, -308], [3359, 0, 0, 0, 312, 0, 234, -437, -841, 0], [0, -3857, 1627, 1738, 0, 48, 0, 0, 0, 306], [-3860, 0, 0, 0, -416, 0, 448, 308, 82, 0], [-8242, 0, 0, 0, -456, 0, 76, -346, 510, 0], [0, -2984, -1172, -268, 0, -426, 0, 0, 0, -156], [0, -2495, 196, -2571, 0, 241, 0, 0, 0, -420], [12947, 0, 0, 0, 104, 0, -38, -753, -253, 0], [24332, 0, 0, 0, 436, 0, -29, 668, 24, 0], [0, -1304, 1468, 1848, 0, 416, 0, 0, 0, -92], [0, -4670, 669, 1722, 0, 387, 0, 0, 0, -148], [28025, 0, 0, 0, 738, 0, -212, 453, -93, 0], [0, -1383, 714, -1644, 0, 280, 0, 0, 0, 54], [9142, 0, 0, 0, 294, 0, -693, 990, 906, 0], [0, 2385, 471, 921, 0, -283, 0, 0, 0, -25], [-7487, 0, 0, 0, 230, 0, -1352, 5, -23, 0], [0, -2706, -61, 1632, 0, 49, 0, 0, 0, -288], [8938, 0, 0, 0, -574, 0, 1424, -584, -88, 0], [0, 782, -1654, 394, 0, 547, 0, 0, 0, -122], [14368, 0, 0, 0, -264, 0, 786, -160, 632, 0], [0, 2191, -1114, 3334, 0, 377, 0, 0, 0, 178], [0, -254, -2679, 1309, 0, 394, 0, 0, 0, 165], [-2943, 0, 0, 0, 416, 0, -810, 229, -571, 0], [20297, 0, 0, 0, 644, 0, -454, 445, 361, 0], [0, -160, 1035, -1644, 0, -87, 0, 0, 0, -70], [-2395, 0, 0, 0, -996, 0, 778, -1431, 893, 0], [0, -1309, 2020, 3851, 0, 307, 0, 0, 0, -436], [-20150, 0, 0, 0, 849, 0, 96, -758, -254, 0], [-5994, 0, 0, 0, 960, 0, 223, -594, 186, 0], [0, 460, -731, -2027, 0, -472, 0, 0, 0, 237], [0, -4733, -1462, -1238, 0, -33, 0, 0, 0, 286], [4124, 0, 0, 0, 498, 0, -1020, 514, 450, 0], [0, -2833, 858, 3382, 0, 141, 0, 0, 0, -482], [0, 5609, 635, -1784, 0, -184, 0, 0, 0, 124], [0, -674, -3903, -159, 0, -94, 0, 0, 0, -415], [0, 4127, 1714, -2888, 0, -174, 0, 0, 0, -114], [0, 5608, 645, -2882, 0, 713, 0, 0, 0, 116], [0, -969, 1826, -3298, 0, 145, 0, 0, 0, 550], [18966, 0, 0, 0, -128, 0, -12, 962, -181, 0], [7262, 0, 0, 0, 283, 0, 512, 816, 416, 0], [0, -956, 124, 1218, 0, 213, 0, 0, 0, 404], [-31030, 0, 0, 0, 1199, 0, -1190, 858, -214, 0], [0, -781, -1725, 2272, 0, 54, 0, 0, 0, -368], [35295, 0, 0, 0, -674, 0, 1620, -1637, -577, 0], [0, 6605, -3100, 4, 0, 14, 0, 0, 0, 252], [0, -3617, -1482, 2986, 0, 11, 0, 0, 0, 610], [0, -4192, 961, -1445, 0, 630, 0, 0, 0, 55], [39374, 0, 0, 0, -480, 0, -1372, 918, -134, 0], [0, -873, 2562, -2665, 0, -679, 0, 0, 0, 360], [18212, 0, 0, 0, 240, 0, -1576, 1380, -1072, 0], [1860, 0, 0, 0, 672, 0, 1073, -492, -424, 0], [17074, 0, 0, 0, -1180, 0, -203, -742, 702, 0], [0, -1665, -2218, 2810, 0, 635, 0, 0, 0, -526], [-14842, 0, 0, 0, 238, 0, 328, 180, 964, 0], [20457, 0, 0, 0, -1454, 0, 876, -1435, -81, 0], [0, 4608, 282, -4434, 0, -667, 0, 0, 0, -42], [39384, 0, 0, 0, -300, 0, 1537, -552, 476, 0], [0, -2183, -1644, 363, 0, 309, 0, 0, 0, 880], [-27, 0, 0, 0, -614, 0, 2028, -703, -313, 0], [0, -6891, 1298, -1090, 0, -399, 0, 0, 0, -618], [24980, 0, 0, 0, -196, 0, 1692, -1488, 1319, 0], [-3182, 0, 0, 0, 456, 0, -1351, 1434, 1182, 0], [0, 2593, 2980, -1164, 0, 470, 0, 0, 0, 796], [-2484, 0, 0, 0, -108, 0, -604, 204, 824, 0], [-490, 0, 0, 0, -162, 0, -192, -976, -512, 0], [0, 2471, -2904, 2824, 0, 284, 0, 0, 0, 408], [0, -9747, -2446, 2638, 0, 1, 0, 0, 0, 230], [0, -9043, -1375, 2261, 0, -921, 0, 0, 0, -357], [22422, 0, 0, 0, -372, 0, 56, -564, -4, 0], [13887, 0, 0, 0, 1676, 0, -1042, 843, -241, 0], [0, 648, -2852, -2256, 0, -828, 0, 0, 0, 340], [-5306, 0, 0, 0, -712, 0, 300, -422, -651, 0], [0, 5057, 1442, -5140, 0, 4, 0, 0, 0, -306], [0, 2165, 182, -642, 0, 885, 0, 0, 0, -158], [-10272, 0, 0, 0, 414, 0, -84, -266, 310, 0], [0, -3160, 2283, -1085, 0, -412, 0, 0, 0, -837], [0, -105, -122, 1462, 0, 641, 0, 0, 0, -270], [0, -1152, -1824, 2584, 0, -500, 0, 0, 0, 576], [0, 6024, -2828, 3322, 0, 41, 0, 0, 0, 380], [61628, 0, 0, 0, 780, 0, -212, 176, 797, 0], [-21952, 0, 0, 0, -792, 0, 960, 160, -760, 0], [-9128, 0, 0, 0, -832, 0, -36, -146, 110, 0], [0, 1494, 1943, 5995, 0, 902, 0, 0, 0, -381], [-11482, 0, 0, 0, 1136, 0, -1484, 726, 724, 0], [0, -4101, 2908, -2497, 0, -209, 0, 0, 0, -688], [0, 4339, -3735, -4012, 0, 182, 0, 0, 0, -1010], [-10881, 0, 0, 0, -80, 0, -1294, 91, -109, 0], [60572, 0, 0, 0, 716, 0, -99, -724, -944, 0], [0, 2874, -5742, -3726, 0, -17, 0, 0, 0, 574], [0, -5031, 1041, 860, 0, -1340, 0, 0, 0, 734], [0, 3804, 3362, -957, 0, -526, 0, 0, 0, -1140], [36795, 0, 0, 0, -570, 0, 1300, 367, 845, 0], [-15022, 0, 0, 0, -1596, 0, 544, 62, -1973, 0], [0, 2491, -3999, 2208, 0, 1702, 0, 0, 0, -450], [0, -9317, -921, 3180, 0, -444, 0, 0, 0, 678], [0, 6451, -6, -5999, 0, 141, 0, 0, 0, 264], [0, 4411, -3334, -2800, 0, 214, 0, 0, 0, 1286], [-9456, 0, 0, 0, -1292, 0, 1484, -74, 1030, 0], [0, 4515, -1912, -4993, 0, -481, 0, 0, 0, -124], [18287, 0, 0, 0, -540, 0, -2194, 1035, 811, 0], [10904, 0, 0, 0, -1230, 0, 19, -856, 20, 0], [0, -4630, -1655, 4472, 0, 17, 0, 0, 0, 1114], [63562, 0, 0, 0, -124, 0, 528, -290, -347, 0], [0, -10717, 2128, 5507, 0, -877, 0, 0, 0, 248], [-10061, 0, 0, 0, -478, 0, 296, 1007, 439, 0], [0, -3322, 4064, 2197, 0, -1314, 0, 0, 0, 8], [0, 280, 2288, -3144, 0, -220, 0, 0, 0, 1376], [18468, 0, 0, 0, 948, 0, -76, 936, -159, 0], [-31546, 0, 0, 0, 86, 0, -1392, 2328, -2168, 0], [26758, 0, 0, 0, -1541, 0, 1136, -2248, -648, 0], [0, 3774, -3372, -142, 0, 941, 0, 0, 0, -660], [0, 7713, -2298, -442, 0, -623, 0, 0, 0, -478], [8782, 0, 0, 0, 96, 0, -2548, -170, 10, 0], [0, 1658, 2952, -2144, 0, 448, 0, 0, 0, -1048], [0, -2470, -603, -2686, 0, 1577, 0, 0, 0, 750], [0, -4603, 932, 2220, 0, -150, 0, 0, 0, -308], [-34893, 0, 0, 0, 1154, 0, 2248, -33, -1165, 0], [-21246, 0, 0, 0, -434, 0, 1088, -2384, 1088, 0], [-37828, 0, 0, 0, -74, 0, -1924, 1502, 958, 0], [0, 2832, -4972, -7404, 0, -58, 0, 0, 0, -116], [0, -13550, 33, -203, 0, 1042, 0, 0, 0, 277], [-29304, 0, 0, 0, -1410, 0, 1116, -578, -434, 0], [0, 900, 2236, -3442, 0, -389, 0, 0, 0, 308], [41326, 0, 0, 0, -1533, 0, 384, 494, 534, 0], [0, -11823, -1576, -864, 0, -384, 0, 0, 0, 824], [28742, 0, 0, 0, 352, 0, -912, 568, -264, 0], [0, -11613, -3741, -1786, 0, -344, 0, 0, 0, -346], [0, 13397, 2978, -3874, 0, -447, 0, 0, 0, -538], [0, -10978, 4981, -784, 0, -799, 0, 0, 0, -822], [0, -2742, -680, 4754, 0, -423, 0, 0, 0, -184], [0, -5461, -1532, 5796, 0, 862, 0, 0, 0, 604], [0, -2908, 5290, -5187, 0, -1290, 0, 0, 0, 56], [-48596, 0, 0, 0, -354, 0, -1361, -148, 664, 0], [43912, 0, 0, 0, 2316, 0, -1964, -504, 1064, 0], [-474, 0, 0, 0, -504, 0, 1436, -1566, 1695, 0], [-68928, 0, 0, 0, 304, 0, -120, 20, 69, 0], [-37546, 0, 0, 0, -584, 0, -1458, 846, 222, 0], [-62494, 0, 0, 0, 744, 0, 500, 478, 511, 0], [0, -6963, -5973, -2500, 0, -524, 0, 0, 0, -44], [2247, 0, 0, 0, 746, 0, 904, -1029, -2027, 0], [24832, 0, 0, 0, 288, 0, -828, 2386, -478, 0], [0, -5401, 2086, 5898, 0, 243, 0, 0, 0, -222], [-10372, 0, 0, 0, 1270, 0, -1307, 572, 1248, 0], [21014, 0, 0, 0, 2672, 0, -310, 1102, 1054, 0], [29798, 0, 0, 0, -1116, 0, 1944, -1742, 1683, 0], [10866, 0, 0, 0, 408, 0, 1300, -462, -664, 0], [0, -5709, 3748, 6165, 0, 727, 0, 0, 0, -408], [0, 8551, -4470, -1268, 0, 628, 0, 0, 0, -394], [-49140, 0, 0, 0, -548, 0, 2156, -452, 1476, 0], [0, -1772, 5547, 4883, 0, 480, 0, 0, 0, 123], [43956, 0, 0, 0, -2064, 0, 1412, -1852, -44, 0], [0, 3261, -2284, -7204, 0, -1422, 0, 0, 0, -36], [26232, 0, 0, 0, 2792, 0, -2602, -40, 1472, 0], [0, -7706, -2969, 6410, 0, -1481, 0, 0, 0, -914], [21388, 0, 0, 0, 916, 0, -2500, 3716, -1962, 0], [72032, 0, 0, 0, 747, 0, -740, -90, -2274, 0], [0, 1089, -17, -3261, 0, 611, 0, 0, 0, 1417], [11100, 0, 0, 0, 2312, 0, -2856, -280, -1613, 0], [0, 7769, -8104, 800, 0, 1392, 0, 0, 0, -40], [-42229, 0, 0, 0, -718, 0, 1272, -2265, 575, 0], [-76286, 0, 0, 0, -244, 0, 837, -406, -2290, 0], [-21940, 0, 0, 0, -1966, 0, 236, -2554, -842, 0], [-10960, 0, 0, 0, 2448, 0, 2257, 624, -1212, 0], [0, 3038, -1164, 9592, 0, -2216, 0, 0, 0, -1012], [0, -11543, 3094, -3836, 0, 860, 0, 0, 0, -390], [30631, 0, 0, 0, -528, 0, 2506, -3885, -1345, 0], [0, 2277, -2418, -2692, 0, 600, 0, 0, 0, 370], [-40664, 0, 0, 0, -114, 0, 2039, -2536, -844, 0], [0, -19120, -1551, 4881, 0, 96, 0, 0, 0, 5], [0, -13325, -1559, 4479, 0, -65, 0, 0, 0, -71], [0, -3665, -8570, 4310, 0, 377, 0, 0, 0, 290], [17330, 0, 0, 0, 1682, 0, -936, 268, 12, 0], [62378, 0, 0, 0, -1547, 0, 1078, 74, -1542, 0], [0, 8131, -1709, -3126, 0, -18, 0, 0, 0, 872], [7570, 0, 0, 0, -1432, 0, 2772, -3022, 848, 0], [-97642, 0, 0, 0, 432, 0, 25, -530, -1166, 0], [-12298, 0, 0, 0, -424, 0, 4012, -2310, 3777, 0], [0, 6887, -4591, 6254, 0, 160, 0, 0, 0, -280], [-28934, 0, 0, 0, -2276, 0, 1656, -1410, 1169, 0], [0, 11313, -2490, 1054, 0, -763, 0, 0, 0, 946], [0, 7763, 8033, -6276, 0, -1008, 0, 0, 0, 1156], [0, -5107, -5936, -8468, 0, -2050, 0, 0, 0, 1024], [30626, 0, 0, 0, -3192, 0, 2200, -1716, 396, 0], [-44266, 0, 0, 0, -1742, 0, 2216, 1060, 468, 0], [0, 7297, -4610, -7854, 0, -121, 0, 0, 0, -518], [46088, 0, 0, 0, 1486, 0, -652, 1274, 122, 0], [0, 1463, -3476, -2287, 0, -425, 0, 0, 0, -76], [0, 1361, 4258, 4474, 0, 215, 0, 0, 0, 2230], [0, 3967, -786, 2968, 0, 638, 0, 0, 0, -414], [6762, 0, 0, 0, 2402, 0, -2312, 3724, -644, 0], [-5815, 0, 0, 0, -490, 0, 1848, -1259, 2635, 0], [10874, 0, 0, 0, -424, 0, 2752, -2544, 2976, 0], [0, -4077, -525, 2665, 0, -1613, 0, 0, 0, -345], [-66415, 0, 0, 0, 2174, 0, -4672, 2005, 105, 0], [-37939, 0, 0, 0, -1140, 0, 514, 145, -987, 0], [0, 7952, 1442, -6290, 0, -411, 0, 0, 0, -1890], [39258, 0, 0, 0, 1217, 0, -1428, -1190, 994, 0], [0, -11072, 1325, -4036, 0, 1983, 0, 0, 0, 70], [72017, 0, 0, 0, 726, 0, -1080, -2451, 3359, 0], [-492, 0, 0, 0, -1547, 0, 1356, -722, 854, 0], [-16703, 0, 0, 0, 940, 0, -46, 1717, 457, 0], [0, -2390, 8582, 1554, 0, 915, 0, 0, 0, -774], [15528, 0, 0, 0, 1384, 0, 1536, -2152, -1604, 0], [-29036, 0, 0, 0, 2816, 0, 1988, -1246, 1378, 0], [0, 2494, -96, -4012, 0, -1566, 0, 0, 0, 1712], [-25018, 0, 0, 0, 1752, 0, -2424, -236, -1692, 0], [0, 4808, 4658, 222, 0, 157, 0, 0, 0, -1362], [-49713, 0, 0, 0, 3526, 0, -1012, -397, -903, 0], [0, 2524, 4007, -4005, 0, -1312, 0, 0, 0, 351], [0, 217, -34, 4573, 0, -1029, 0, 0, 0, 116], [0, -958, 5882, 10985, 0, 1628, 0, 0, 0, -912], [0, -10385, 959, 4562, 0, 2382, 0, 0, 0, 256], [87512, 0, 0, 0, -1601, 0, 1964, -3202, 1222, 0], [78302, 0, 0, 0, 2488, 0, -1436, 4518, 490, 0], [85346, 0, 0, 0, 1686, 0, 1320, 228, 596, 0], [0, 4671, 5402, 4336, 0, 222, 0, 0, 0, -170], [0, -4567, 2022, 2918, 0, 1721, 0, 0, 0, -46], [29076, 0, 0, 0, 124, 0, -3708, 3580, 2, 0], [0, 15313, -1841, 5604, 0, -566, 0, 0, 0, 478], [34107, 0, 0, 0, -1752, 0, 2258, -409, -2297, 0], [0, 143, 1378, -11066, 0, 2261, 0, 0, 0, 870], [-13014, 0, 0, 0, 753, 0, 448, 2026, 418, 0], [0, -14287, -4091, -9884, 0, 36, 0, 0, 0, 1370], [-28937, 0, 0, 0, -1124, 0, -2682, 2611, 1939, 0], [0, -5551, 6916, 1572, 0, 758, 0, 0, 0, 908], [-5199, 0, 0, 0, 3026, 0, -3348, 2677, -1279, 0], [70764, 0, 0, 0, 1072, 0, -1606, 3100, -3404, 0], [0, -12111, 10422, -1014, 0, 843, 0, 0, 0, -1182], [0, -7326, -2346, -923, 0, 384, 0, 0, 0, -904], [-83477, 0, 0, 0, 520, 0, -2598, 2087, 3091, 0], [-64414, 0, 0, 0, 900, 0, -693, 1098, -1162, 0], [0, 5788, 3293, 3942, 0, 477, 0, 0, 0, -1076], [64050, 0, 0, 0, 1656, 0, -792, 52, -2636, 0], [130558, 0, 0, 0, 1248, 0, 660, 870, 1954, 0], [0, 13264, 5538, 5005, 0, 1522, 0, 0, 0, 1408], [0, -15590, 4541, 9668, 0, -2191, 0, 0, 0, -402], [0, -9465, -2818, -11930, 0, 305, 0, 0, 0, -2022], [22242, 0, 0, 0, 2680, 0, 1672, 2884, -1500, 0], [139110, 0, 0, 0, -1127, 0, 2336, -2304, -528, 0], [0, -9685, -448, -348, 0, 1194, 0, 0, 0, 976], [0, 3077, 7510, 5952, 0, -798, 0, 0, 0, -1878], [0, -8950, 1257, -2279, 0, 886, 0, 0, 0, -2927], [-6122, 0, 0, 0, -1512, 0, 141, 366, -1358, 0], [-63666, 0, 0, 0, 2332, 0, -4288, 2674, -87, 0], [-23337, 0, 0, 0, 252, 0, 1190, 1923, 863, 0], [-20086, 0, 0, 0, -1916, 0, -1508, -1358, 298, 0], [0, -8611, 2163, 5926, 0, 134, 0, 0, 0, -1470], [40520, 0, 0, 0, -276, 0, -2532, 432, -30, 0], [0, 12660, -11952, 476, 0, -706, 0, 0, 0, -1584], [0, 7939, -754, 6065, 0, 645, 0, 0, 0, -1196], [0, 1253, 206, 5038, 0, -1539, 0, 0, 0, -3046], [-63336, 0, 0, 0, -386, 0, 1091, -5624, -188, 0], [0, 14105, -4237, 608, 0, -346, 0, 0, 0, -1282], [48468, 0, 0, 0, -4400, 0, 4352, -2428, -644, 0], [0, 17912, -4732, -10642, 0, -1205, 0, 0, 0, -580], [0, 1582, -1891, 6379, 0, 1352, 0, 0, 0, -97], [0, 19245, -8841, 1012, 0, -1444, 0, 0, 0, 2536], [49366, 0, 0, 0, -5456, 0, 2228, -1990, 761, 0], [101270, 0, 0, 0, 2276, 0, -2992, 1582, -938, 0], [0, -14124, 15284, 9414, 0, 943, 0, 0, 0, -36], [0, -18204, -8696, 6940, 0, 1790, 0, 0, 0, -312]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_1568_a_Hecke( : Kf := Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_1568_4_a_bm();".
// 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_1568_4_a_bm(:prec:=10)
    chi := MakeCharacter_1568_a();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 4));
    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_1568_4_a_bm();".
// 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_1568_4_a_bm( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1568_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,4,sign)));
    Vf := Kernel([<3,R![-2367488, 0, 1602048, 0, -266632, 0, 12236, 0, -198, 0, 1]>,<5,R![-4682022912, 0, 1059981568, 0, -28184896, 0, 242148, 0, -836, 0, 1]>,<11,R![-1502720, 412672, 71416, -2740, -22, 1]>],Snew);
    return Vf;
end function;