
// Make newform 464.3.d.b in Magma, downloaded from the LMFDB on 17 November 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_464_d();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_464_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_464_3_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_464_3_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 := [21609, 0, 862449, 0, 3148495, 0, 3989370, 0, 2508433, 0, 892623, 0, 189561, 0, 24222, 0, 1795, 0, 69, 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, 0, 0, 0, 0, 0, 0, 0], [-24957173283, 0, -177458469041, 0, -221364373482, 0, -113611368386, 0, -18416701329, 0, 4124199909, 0, 1929025386, 0, 264806302, 0, 14955825, 0, 269119, 0], [-29241914583, 0, -511362980275, 0, -1187433500870, 0, -965916438026, 0, -389643831661, 0, -88899687189, 0, -11927037014, 0, -918073114, 0, -36402591, 0, -538883, 0], [-132028188327, 0, 4658194352973, 0, 18054214873254, 0, 18342774305998, 0, 8443630548159, 0, 2080514274031, 0, 290379259542, 0, 22671980714, 0, 897749793, 0, 13214681, 0], [0, 10598814513, 0, 29241375044, 0, 33404128170, 0, 21605398480, 0, 8253402375, 0, 1869567576, 0, 250205022, 0, 19101116, 0, 747381, 0, 10936], [-41589924285, 0, -482946172219, 0, -1104754236502, 0, -979251701432, 0, -433226755077, 0, -106796641785, 0, -15217333392, 0, -1225295662, 0, -50166367, 0, -757289, 0], [-12352318272, 0, -3274322583581, 0, -11905342686538, 0, -12710202390780, 0, -6239923059684, 0, -1645762719753, 0, -245686535916, 0, -20436920204, 0, -855428506, 0, -13082613, 0], [-75153189783, 0, -1599323728387, 0, -4868711941898, 0, -4686723065350, 0, -2117595588861, 0, -516897110017, 0, -71565124038, 0, -5536671654, 0, -217019291, 0, -3168803, 0], [-1132793231829, 0, -16118928681065, 0, -48320959468642, 0, -47177177916762, 0, -21765200499019, 0, -5458427250335, 0, -780334603670, 0, -62516866638, 0, -2535952577, 0, -37977677, 0], [183966243909, 0, 3186498766283, 0, 10054783986450, 0, 10441706401586, 0, 5121109060023, 0, 1360361904093, 0, 205149355410, 0, 17257669802, 0, 730259037, 0, 11254547, 0], [1264306787709, 0, 69855863267351, 0, 203067435541530, 0, 193484244030362, 0, 88319024419575, 0, 22078479809865, 0, 3159391510218, 0, 253965882410, 0, 10347255573, 0, 155501111, 0], [0, -16844008902672, 0, -25180233298045, 0, 74618847039954, 0, 111157559658890, 0, 58084381410870, 0, 15294758270007, 0, 2227767857166, 0, 179293861268, 0, 7258096644, 0, 108346853], [0, 4647445493355, 0, 32894333841313, 0, 63496535790058, 0, 50550209017184, 0, 20497839911803, 0, 4658675196655, 0, 612950649536, 0, 45661735278, 0, 1740535793, 0, 24959967], [0, -4009400719128, 0, 4876392032211, 0, -36469643407330, 0, -55470212118058, 0, -29816703645186, 0, -8025223854213, 0, -1191456127314, 0, -97597388088, 0, -4013927296, 0, -60588499], [0, 35240748098808, 0, -100416926761109, 0, -323802742801566, 0, -305931614095586, 0, -139499345201478, 0, -35079253355649, 0, -5070395023398, 0, -412592166284, 0, -17021686536, 0, -258162071], [0, 19264652092644, 0, 82774196468957, 0, 132036141139574, 0, 100408982661758, 0, 41127935527246, 0, 9659511066837, 0, 1326071703002, 0, 103406444000, 0, 4117881696, 0, 60980495], [0, 40430927254620, 0, 65555112945973, 0, -231870594479958, 0, -344036816132498, 0, -182835724424982, 0, -49338273908355, 0, -7396182653562, 0, -613696544504, 0, -25576963008, 0, -389833673], [0, -13092847367712, 0, -139403234684399, 0, -306680573343354, 0, -264159494330678, 0, -113967245421850, 0, -27260928827115, 0, -3743237889602, 0, -288959154860, 0, -11335372240, 0, -165753053], [0, -63775765633188, 0, -444957631956439, 0, -979529094604326, 0, -861783988272682, 0, -382259266496022, 0, -94812151934631, 0, -13602452080122, 0, -1102288771984, 0, -45371705136, 0, -687333589], [0, -8694964918311, 0, -55249860475922, 0, -108378279328578, 0, -90997204908572, 0, -39426689228133, 0, -9636005711802, 0, -1367135984622, 0, -109749087416, 0, -4481300403, 0, -67516814]];
    Rf_basisdens := [1, 3750443928, 4643406768, 32503847376, 236023788, 1250147976, 16251923688, 2954895216, 32503847376, 8864685648, 97511542128, 682580794896, 113763465816, 227526931632, 682580794896, 113763465816, 682580794896, 227526931632, 682580794896, 48755771064];
    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_464_d();"
function MakeCharacter_464_d()
    N := 464;
    order := 2;
    char_gens := [175, 117, 321];
    v := [1, 2, 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_464_d_Hecke();"
function MakeCharacter_464_d_Hecke(Kf)
    N := 464;
    order := 2;
    char_gens := [175, 117, 321];
    char_values := [[-1, 0, 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, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 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 := 3;
    raw_aps := [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, -1, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 1, 0, -1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, -1, -1, 0, 0, 0, -1, 0], [0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 1, 0, -1, 1, 0, 0, 0, 1], [-4, 1, 2, 3, 0, -1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-4, -2, 0, 0, 0, 1, -1, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3, -1, -1, 0, 0, 2, 0, -1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 1, 1, 0, 1, 1, -1, -1], [4, 2, -1, -1, 0, 0, -2, -1, 2, -2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 3, 0, -3, -1, -1, 4, -1, -2, -1], [-4, 1, 0, 2, 0, 1, 1, 0, -2, 3, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 1, 1, 0, 2, 0, 1, -2], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -2, 2, -2, 2, 2, 0], [-14, 3, 4, 1, 0, 3, -3, -4, 0, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 3, 0, 0, -3, -2, -2, -3, 2, 0], [0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 4, -2, 0, -2, -3, 0, 1, 1, -1], [-4, 0, 6, -2, 0, 3, 1, -2, -2, -2, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0], [6, -3, 0, -11, 0, -2, -2, 2, -4, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [6, 4, 2, 0, 0, 0, -2, 4, 2, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, -1, 8, -1, 3, 0, 2, 2, 1, 0], [0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 18, 2, -2, -2, -5, 4, 1, -1, -1], [1, 14, 3, 0, 0, -2, 2, 1, -3, -2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0], [8, -2, 0, -12, 0, 2, 2, 4, 2, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -3, 0, 0, 0, 0, 0, 0, 10, 6, 0, 4, -3, 3, 0, 1, -5], [0, 0, 0, 0, -4, 0, 0, 0, 0, 0, 0, -4, 12, 2, 4, 5, 5, 2, 1, 3], [2, 3, 6, -11, 0, 1, 1, -4, 0, 1, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, -18, 2, 0, -2, -3, -8, 1, 3, 3], [38, 14, -1, 13, 0, -2, 6, 7, -4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -6, 0, 0, 0, 0, 0, 0, 16, -9, -2, 0, 2, -10, -4, 0, 4], [-30, 13, 2, -8, 0, 1, 3, 0, 0, 3, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 13, -2, 0, 0, 4, -6, 2, 8, 2], [0, 0, 0, 0, -8, 0, 0, 0, 0, 0, 0, -7, -8, -1, 1, 2, 0, 2, -1, 4], [12, 12, -4, -10, 0, -8, 6, 2, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 2, 2, 2, -4, 6, -6, -4, 4, 0], [-22, 10, -6, 11, 0, -6, -6, 0, 2, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, -9, -1, -5, -6, -5, -6, 0, -4, -2], [40, 1, -8, -5, 0, 6, -4, 4, 6, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-36, 2, 2, -2, 0, 8, 2, 4, 2, -2, -4, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, -10, 9, -2, 6, -2, -2, 2, -2, 2], [0, 0, 0, 0, -4, 0, 0, 0, 0, 0, 0, 28, 9, -3, -2, 2, -5, 6, -3, 3], [0, 0, 0, 0, -10, 0, 0, 0, 0, 0, 0, 13, 4, 3, -1, 0, 4, 6, 9, 4], [0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 19, -8, -5, -1, 2, 2, -2, -3, 0], [12, 8, 0, -15, 0, 8, 0, 12, -10, 8, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0], [78, 0, -6, 1, 0, -3, 6, 4, -10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -8, 0, 0, 0, 0, 0, 0, 27, -7, -1, 1, 0, 16, 4, -5, 2], [-39, 4, 7, -2, 0, -1, 8, 1, 9, 4, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0, 1, -1, 6, -10, 15, -2, -15, 1], [46, -8, 15, -4, 0, 8, -6, 0, -8, -4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, -13, -2, -9, -3, 3, 7, -4, -5, 0], [-18, -4, 14, 21, 0, -8, 2, -8, 4, -8, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, -5, -2, -9, -9, 1, -3, -10, -1, 0], [66, 4, 2, -10, 0, -4, 2, -8, -6, -10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-67, -24, -17, 6, 0, -3, -2, -9, 1, 4, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -3, 0, 0, 0, 0, 0, 0, -15, -2, -7, -9, -9, -2, -3, 4, 3], [-92, 22, 22, -20, 0, 10, 0, 0, 4, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -6, 0, 0, 0, 0, 0, 0, 13, -9, -1, -2, -10, 10, -4, -3, 3], [0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, -17, 5, 19, 10, 13, -4, 2, 4, -4], [-5, 36, 2, 23, 0, 10, 4, 9, -15, 8, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-16, -18, 4, -19, 0, 6, -2, 12, -6, 14, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -14, 0, 0, 0, 0, 0, 0, -4, 19, 1, -6, 14, 9, 6, 11, -9], [82, -5, 10, 29, 0, -14, 4, -12, 4, 3, -4, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -18, 0, 0, 0, 0, 0, 0, -10, -26, -6, -12, -2, 8, -8, -6, 8], [-33, -12, 12, -8, 0, 0, 8, 6, 5, 12, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0], [9, -22, -13, 9, 0, 8, -10, -3, 1, 12, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -32, 0, 0, 0, 0, 0, 0, 5, 28, -6, -5, 16, 14, 1, -4, 4], [0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, -37, 7, 3, 6, 1, -20, 2, 0, -4], [103, 14, 9, 14, 0, -4, 6, 3, 7, -10, -12, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, -39, 17, 1, 0, -3, -2, 6, 4, -6], [0, 0, 0, 0, -6, 0, 0, 0, 0, 0, 0, 61, -21, 1, 9, 18, 6, 12, 11, -16], [-112, 5, -12, -5, 0, 9, -15, 4, 0, -3, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-198, -48, 14, 25, 0, -14, -4, -2, -2, -16, -10, 0, 0, 0, 0, 0, 0, 0, 0, 0], [115, -34, -23, 8, 0, 3, -20, -17, 23, -2, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0], [56, 34, -26, 32, 0, 2, 0, 12, -6, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -18, 0, 0, 0, 0, 0, 0, 39, 12, 3, -11, 10, 24, 8, 11, -6], [24, -26, -42, 39, 0, -14, 2, 2, 6, 22, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, -10, 29, 14, 18, 8, 2, 4, -14, 6], [-78, 21, 12, 9, 0, -1, 17, 4, -12, -5, -14, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, -93, 27, -9, 9, 8, 12, -6, 1, 6], [0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 63, 27, -1, -4, -19, 6, -4, 10, 0], [66, -1, 2, 33, 0, 21, -7, 2, -8, 17, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0], [13, 86, 7, 11, 0, 2, 14, -9, -3, 0, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0], [58, -27, 10, 25, 0, 21, -7, 10, 2, -15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -32, 0, 0, 0, 0, 0, 0, 17, 57, 3, 9, 18, -10, 0, 7, 4], [0, 0, 0, 0, -12, 0, 0, 0, 0, 0, 0, -29, -27, 1, -6, -26, -8, -10, -7, -1], [0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 10, -45, -4, 5, 19, -14, 2, 16, -7], [0, 0, 0, 0, -22, 0, 0, 0, 0, 0, 0, -27, -3, -9, 1, 6, -4, 6, 1, -10], [0, 0, 0, 0, -16, 0, 0, 0, 0, 0, 0, -5, -35, -7, -6, 6, -22, -2, -11, 7], [0, 0, 0, 0, -13, 0, 0, 0, 0, 0, 0, 49, 50, -9, -1, -11, 10, -5, 8, -13], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 37, 8, 3, -9, -4, 6, 0, -1], [99, 0, 4, -46, 0, -4, -12, 0, 1, 8, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-129, 48, 24, 53, 0, -18, 24, -1, -19, 20, -10, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, -56, -8, 8, 24, 4, -18, -6, 12, 12], [50, -25, 6, 37, 0, 7, 13, 0, -18, 11, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 5, -32, 1, -15, -13, -16, -11, 2, 13], [91, -38, -25, -23, 0, -14, 6, -17, 13, -14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -34, 0, 0, 0, 0, 0, 0, 44, 7, 5, 14, -14, 13, 6, 15, -13], [148, 1, -8, -29, 0, -5, -27, 2, 6, -17, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -48, 0, 0, 0, 0, 0, 0, 78, -36, 0, -16, 0, 6, 6, 10, -12], [32, 60, -20, -18, 0, 13, 3, 10, 2, 22, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 18, 20, 16, -18, 5, -22, 9, 29, -5], [-135, 4, 2, 7, 0, -22, 34, -7, -25, -20, -18, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 16, -41, -17, -25, -20, -5, -13, -7, 5], [24, 32, 46, 30, 0, -7, -11, 12, 6, 10, -4, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -8, 0, 0, 0, 0, 0, 0, -52, 39, 10, -11, -3, 2, 4, 10, 5], [-65, 6, 17, -16, 0, 26, -14, 3, 7, 10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-34, -9, -46, -31, 0, 1, 1, -8, 24, 1, -14, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 30, 1, 19, 6, 26, -45, 16, 23, -5], [0, 0, 0, 0, -42, 0, 0, 0, 0, 0, 0, 37, 8, 9, 21, 18, 42, 2, 3, -18], [-44, -27, 2, 39, 0, -14, 20, 8, 10, -3, -18, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 123, 2, -7, -19, -7, 14, 5, 18, -1], [0, 0, 0, 0, -44, 0, 0, 0, 0, 0, 0, 31, 13, 19, 13, 8, 26, 14, 15, 2], [-142, -14, -12, -39, 0, -12, -28, 12, -28, -18, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 31, -26, 16, -4, -8, -6, 8, 6, 16], [-183, -32, -33, 9, 0, -6, 6, 23, 1, 26, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-338, 26, -6, 39, 0, 11, -12, -22, 18, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-164, -12, 14, -8, 0, 34, -22, -22, -8, -18, -18, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 50, -18, -6, 8, 34, -10, -8, -2, -4], [0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, -109, -34, -5, 23, 0, 24, -10, -19, 6], [-10, -62, 3, 33, 0, 14, 2, -23, 0, 2, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0], [51, 2, -38, -48, 0, -10, -6, -4, -3, 2, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -18, 0, 0, 0, 0, 0, 0, 21, -42, 7, -17, -18, -2, -16, 9, -2], [0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 5, -63, -3, 24, -3, 40, 6, -34, 20], [-38, -20, 6, -20, 0, 18, -20, 8, -6, 22, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 96, 0, 0, 0, 0, 0, 0, -95, 36, 10, -30, 16, -32, -16, 6, -8], [0, 0, 0, 0, 67, 0, 0, 0, 0, 0, 0, -101, -13, 19, 16, 17, -22, 0, 6, 10], [0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 3, -43, 7, -30, -3, -32, 12, 2, 24], [-186, -38, 20, -11, 0, -16, 8, 12, 4, 14, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0], [73, 30, 31, -17, 0, -6, 38, -5, -35, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [200, 10, 30, 38, 0, -19, 31, 8, -26, 12, -16, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-184, 31, 46, 14, 0, -9, -19, 8, 14, -19, -11, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 13, 10, 7, 23, -16, 26, -30, -13, -10], [562, -43, 14, -28, 0, 1, 1, -14, -8, 3, -17, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-180, -31, 14, -17, 0, 7, -1, 4, -18, 19, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -47, 0, 0, 0, 0, 0, 0, -24, 0, 16, 2, 5, 46, 21, -11, -25], [-8, 96, 37, 39, 0, -4, 20, -15, -38, -12, -6, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -73, 0, 0, 0, 0, 0, 0, 64, 36, -10, -6, -17, 37, 10, -1, -11], [0, 0, 0, 0, -10, 0, 0, 0, 0, 0, 0, -24, -39, 33, -14, 18, 19, 8, 15, -19], [-88, -37, 34, 68, 0, -15, 7, -20, 2, -27, -35, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -8, 0, 0, 0, 0, 0, 0, -115, 14, -32, 1, -16, 38, -3, -14, -4], [-266, 7, 16, 53, 0, -21, 41, -6, -10, -17, -12, 0, 0, 0, 0, 0, 0, 0, 0, 0], [120, -4, 5, -2, 0, 10, 2, -2, -30, 0, -20, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 102, 0, 0, 0, 0, 0, 0, 57, -5, 11, -10, -30, -28, -12, -19, 15], [0, 0, 0, 0, -86, 0, 0, 0, 0, 0, 0, 39, -44, 11, 13, 26, -32, 2, 13, 0], [-54, -80, -11, -43, 0, 8, 12, 15, 24, -16, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-148, -134, -46, -98, 0, 6, 8, 8, -6, -30, -4, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -71, 0, 0, 0, 0, 0, 0, 78, -10, 8, 10, -41, 22, -17, -11, 5], [0, 0, 0, 0, -36, 0, 0, 0, 0, 0, 0, -93, -10, -17, -21, 3, 19, -6, 3, 4], [0, 0, 0, 0, -30, 0, 0, 0, 0, 0, 0, 7, 83, 23, -18, 35, -30, 2, -6, -8], [0, 0, 0, 0, -80, 0, 0, 0, 0, 0, 0, -113, -56, 3, 1, 17, -5, 10, 3, 26], [0, 0, 0, 0, -90, 0, 0, 0, 0, 0, 0, -6, -16, 22, 10, 6, 48, 20, 28, -24], [334, 2, -6, 42, 0, -8, -2, 8, 30, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-265, -2, -47, -1, 0, -2, -8, 3, -25, -12, -4, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-275, 94, 31, 2, 0, 24, -18, -29, 17, 14, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 39, -89, 1, 14, -14, -10, -18, 3, 11], [528, 12, 8, -3, 0, -3, 6, -28, 0, 28, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, -30, 13, -21, 7, -16, 21, -11, -51, -5], [0, 0, 0, 0, 118, 0, 0, 0, 0, 0, 0, -43, -33, 13, -4, 9, -4, 2, 2, -6], [-413, -94, -50, -99, 0, 18, 4, 5, 17, 30, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 96, -43, 1, 5, -4, -45, 7, 43, 5], [0, 0, 0, 0, -16, 0, 0, 0, 0, 0, 0, -64, -22, -4, -8, -30, -12, -14, -60, 32], [-124, 8, -30, 136, 0, -20, 50, 12, -12, 18, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_464_d_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_464_3_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_464_3_d_b(:prec:=20)
    chi := MakeCharacter_464_d();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 3));
    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_464_3_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_464_3_d_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_464_d();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<3,R![3732624, 0, 291107556, 0, 798932953, 0, 540771784, 0, 169151012, 0, 29101248, 0, 2944622, 0, 178968, 0, 6404, 0, 124, 0, 1]>],Snew);
    return Vf;
end function;