
// Make newform 1440.3.j.d in Magma, downloaded from the LMFDB on 20 March 2026.
// To make the character of type GrpDrchElt, type "MakeCharacter_1440_j();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_1440_j_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_1440_3_j_d();".
// 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_1440_3_j_d();".
// 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 := [5584, -12416, 20996, -19884, 17189, -9954, 5517, -2094, 792, -190, 49, -6, 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], [-332836, 1025980, -1137378, 939397, -245369, 39160, 73948, -43226, 17844, -5377, 847, -154], [-870, 1998, -3205, 2703, -2103, 984, -468, 126, -39, 5, -1, 0], [-1546, 3252, -4902, 3642, -2707, 1151, -533, 134, -41, 5, -1, 0], [-1776, 3292, -4942, 3642, -2707, 1151, -533, 134, -41, 5, -1, 0], [5176, -10146, 15607, -12141, 9236, -4133, 1947, -512, 158, -20, 4, 0], [-155264, 674124, -1305402, 1636412, -1331991, 916887, -428001, 186684, -51219, 14627, -1947, 354], [-1604700, 5659542, -8661249, 10446477, -8098956, 5530825, -2552389, 1112258, -304644, 87022, -11594, 2108], [8618592, -11113590, 14501281, -1397518, 987579, 4526937, -1771935, 1595576, -368230, 169039, -18347, 5240], [-15734624, 39268522, -63669191, 60469984, -46287543, 25877893, -11853943, 4262700, -1192106, 273769, -39293, 5240], [-2623076, 10318414, -17810601, 21065921, -15750076, 10406405, -4538905, 1930250, -502224, 141782, -18106, 3292], [1513948, -6228128, 11348030, -13780034, 10725466, -7233800, 3267292, -1407884, 376734, -107002, 13970, -2540]];
    Rf_basisdens := [1, 34910, 10, 10, 10, 10, 6982, 34910, 69820, 69820, 34910, 17455];
    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_1440_j();"
function MakeCharacter_1440_j()
    N := 1440;
    order := 2;
    char_gens := [991, 901, 641, 577];
    v := [1, 2, 2, 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;

// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_1440_j_Hecke();"
function MakeCharacter_1440_j_Hecke( : Kf := false)
    N := 1440;
    order := 2;
    char_gens := [991, 901, 641, 577];
    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], [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 := 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, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -1, 1, 1, 1, 0, 0], [0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, -1], [0, 1, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 2, 0, -1, -1, -1, 0], [7, 0, -1, 2, 0, 1, 0, 0, 1, -1, 0, 0], [6, 0, -2, 0, -2, -2, 0, 0, 3, -3, 0, 0], [0, 3, 0, 0, 0, 0, 3, 0, -1, -1, -1, 0], [0, 1, 0, 0, 0, 0, 8, 1, -4, -4, 0, -3], [-10, 0, -2, -2, -4, 2, 0, 0, 0, 0, 0, 0], [-20, 0, 2, -2, 1, 2, 0, 0, -2, 2, 0, 0], [-13, 0, 1, 0, -2, -3, 0, 0, 7, -7, 0, 0], [0, -2, 0, 0, 0, 0, -8, 2, 5, 5, 4, 2], [0, -2, 0, 0, 0, 0, -9, 1, -3, -3, 0, 4], [-2, 0, 0, 0, 8, 8, 0, 0, -8, 8, 0, 0], [32, 0, -2, -2, -1, 0, 0, 0, 2, -2, 0, 0], [0, -2, 0, 0, 0, 0, -4, -2, -8, -8, 2, -8], [0, -4, 0, 0, 0, 0, -14, 6, 2, 2, 2, 0], [0, -1, 0, 0, 0, 0, -3, 0, -5, -5, -5, -4], [2, 0, 4, -2, 1, 0, 0, 0, 4, -4, 0, 0], [-2, 0, 2, -6, 4, -2, 0, 0, -6, 6, 0, 0], [0, -4, 0, 0, 0, 0, -2, 4, 8, 8, 4, 10], [44, 0, 0, 0, -16, 0, 0, 0, 1, -1, 0, 0], [-42, 0, -6, 8, 4, 1, 0, 0, 6, -6, 0, 0], [-18, 0, -6, 0, 1, 2, 0, 0, 6, -6, 0, 0], [-22, 0, 0, -8, -8, -8, 0, 0, -2, 2, 0, 0], [0, 7, 0, 0, 0, 0, 1, 13, -2, -2, -4, 0], [38, 0, 6, 4, 6, -9, 0, 0, 10, -10, 0, 0], [0, 4, 0, 0, 0, 0, 19, 1, -17, -17, 2, -20], [0, 3, 0, 0, 0, 0, 5, 5, -8, -8, 8, -20], [0, -5, 0, 0, 0, 0, 2, 18, -1, -1, 5, -8], [22, 0, 10, -8, 2, -6, 0, 0, -1, 1, 0, 0], [0, -11, 0, 0, 0, 0, -3, -12, 1, 1, -3, 28], [0, 3, 0, 0, 0, 0, -4, -5, 8, 8, 0, -13], [-32, 0, -4, -4, -17, -6, 0, 0, 20, -20, 0, 0], [11, 0, 9, 0, 12, 7, 0, 0, -1, 1, 0, 0], [0, 0, 0, 0, 0, 0, -10, -4, -11, -11, 16, -18], [0, 8, 0, 0, 0, 0, -9, 9, -17, -17, 2, -4], [-22, 0, 0, -4, 12, 0, 0, 0, 10, -10, 0, 0], [0, 8, 0, 0, 0, 0, -14, -6, 2, 2, -16, -12], [0, 8, 0, 0, 0, 0, -20, -2, 6, 6, -6, -10], [0, 6, 0, 0, 0, 0, 22, 14, -1, -1, -4, 20], [0, 3, 0, 0, 0, 0, -15, -8, 7, 7, -9, 0], [0, 5, 0, 0, 0, 0, -14, 6, 17, 17, 3, 32], [-152, 0, 20, -4, 6, -9, 0, 0, -4, 4, 0, 0], [122, 0, 8, -6, -11, 12, 0, 0, 0, 0, 0, 0], [54, 0, -4, 12, -8, 12, 0, 0, 10, -10, 0, 0], [0, -19, 0, 0, 0, 0, -33, -5, -10, -10, 0, 20], [0, -8, 0, 0, 0, 0, 10, -22, 2, 2, 0, 20], [-102, 0, 8, -4, 28, 8, 0, 0, -20, 20, 0, 0], [0, -14, 0, 0, 0, 0, 9, -9, 5, 5, 14, -16], [0, -11, 0, 0, 0, 0, 7, -1, 18, 18, 4, -20], [-97, 0, 13, 8, 0, -9, 0, 0, -5, 5, 0, 0], [-10, 0, -18, 8, 22, 14, 0, 0, -15, 15, 0, 0], [0, 1, 0, 0, 0, 0, 15, 0, -23, -23, -15, 12], [0, -9, 0, 0, 0, 0, -8, 27, 6, 6, -4, -33], [-46, 0, -12, 12, -24, -20, 0, 0, 16, -16, 0, 0], [-120, 0, 6, -18, 7, -4, 0, 0, -22, 22, 0, 0], [0, 6, 0, 0, 0, 0, -6, -30, -11, -11, -8, 0], [-36, 0, -4, -24, -11, 0, 0, 0, 20, -20, 0, 0], [0, -8, 0, 0, 0, 0, -38, 14, 10, 10, 4, -32], [0, 0, 0, 0, 0, 0, -20, -6, -34, -34, -10, -18], [0, 10, 0, 0, 0, 0, 46, -22, 1, 1, -12, 40], [0, 5, 0, 0, 0, 0, 44, 28, -13, -13, 7, -8], [0, 4, 0, 0, 0, 0, 54, -2, 2, 2, -22, 36], [104, 0, 2, -6, -5, -42, 0, 0, 6, -6, 0, 0], [30, 0, 16, 4, 4, 0, 0, 0, -12, 12, 0, 0], [0, 9, 0, 0, 0, 0, -69, 7, 46, 46, -8, 16], [0, 6, 0, 0, 0, 0, -6, 24, 22, 22, 6, -20], [86, 0, 2, 16, 38, 11, 0, 0, -50, 50, 0, 0], [0, -15, 0, 0, 0, 0, -72, -3, -8, -8, -12, 21], [0, 9, 0, 0, 0, 0, -36, 14, 1, 1, 11, -8], [-169, 0, -13, 6, 6, 11, 0, 0, -3, 3, 0, 0], [-108, 0, 8, -4, 4, 16, 0, 0, 17, -17, 0, 0], [0, -9, 0, 0, 0, 0, 28, -13, -2, -2, 12, -47], [102, 0, -14, 30, 16, 22, 0, 0, -16, 16, 0, 0], [-140, 0, 6, 16, 26, 22, 0, 0, 16, -16, 0, 0], [0, -26, 0, 0, 0, 0, 15, -3, 11, 11, 6, 8], [-186, 0, 4, 0, -4, -20, 0, 0, 30, -30, 0, 0], [0, -2, 0, 0, 0, 0, -54, -28, 14, 14, 18, 8], [0, 10, 0, 0, 0, 0, -88, 18, 20, 20, 8, -26], [0, -9, 0, 0, 0, 0, 25, -4, 43, 43, -1, 24], [-134, 0, 4, -10, -23, 20, 0, 0, -44, 44, 0, 0], [-34, 0, -4, 20, 16, 4, 0, 0, -38, 38, 0, 0], [0, 16, 0, 0, 0, 0, 22, 0, 16, 16, -4, 46], [-154, 0, -2, 12, 26, -42, 0, 0, -15, 15, 0, 0], [-334, 0, -6, 20, -30, 23, 0, 0, -42, 42, 0, 0], [-96, 0, 34, -14, 7, 22, 0, 0, -42, 42, 0, 0], [0, 6, 0, 0, 0, 0, 16, -34, 24, 24, -6, 4], [298, 0, 2, -12, -36, -23, 0, 0, 62, -62, 0, 0], [0, 34, 0, 0, 0, 0, 55, -31, 45, 45, -8, 36], [0, -25, 0, 0, 0, 0, -76, -12, 53, 53, -7, 48], [-151, 0, 11, -8, -24, 3, 0, 0, -51, 51, 0, 0], [-80, 0, 24, 20, -4, 16, 0, 0, -27, 27, 0, 0], [-198, 0, 28, -4, 48, 36, 0, 0, -2, 2, 0, 0], [-368, 0, 48, 0, 39, -2, 0, 0, 16, -16, 0, 0], [82, 0, -16, -28, -76, 16, 0, 0, -6, 6, 0, 0], [288, 0, -22, 42, 9, 50, 0, 0, -10, 10, 0, 0], [0, -20, 0, 0, 0, 0, 6, 0, 9, 9, 8, 34], [-216, 0, 14, 6, 55, 34, 0, 0, -54, 54, 0, 0], [-90, 0, 22, 14, 28, 42, 0, 0, -36, 36, 0, 0], [0, -27, 0, 0, 0, 0, 40, -32, 51, 51, -5, -16], [0, -26, 0, 0, 0, 0, 44, -4, 42, 42, 26, 56], [6, 0, -38, -8, -11, -38, 0, 0, 6, -6, 0, 0], [0, 11, 0, 0, 0, 0, 33, -39, -54, -54, 20, -20], [0, -2, 0, 0, 0, 0, 22, 12, -2, -2, -14, -12], [204, 0, 22, 0, -54, -10, 0, 0, 76, -76, 0, 0], [252, 0, 8, -12, -18, -29, 0, 0, -24, 24, 0, 0], [0, 25, 0, 0, 0, 0, -116, 17, -38, -38, 0, 23], [0, 43, 0, 0, 0, 0, 13, 17, -38, -38, -28, -60], [0, 11, 0, 0, 0, 0, -46, 58, 19, 19, -23, -32], [0, -27, 0, 0, 0, 0, -93, -8, -39, -39, 25, -16], [70, 0, 16, -32, 64, -64, 0, 0, -34, 34, 0, 0], [-656, 0, 32, -16, -25, -38, 0, 0, -48, 48, 0, 0], [245, 0, 19, -36, -4, 7, 0, 0, 21, -21, 0, 0], [0, -12, 0, 0, 0, 0, -72, 40, 29, 29, -12, -20], [0, 10, 0, 0, 0, 0, -11, -5, -37, -37, 20, -52], [-310, 0, 12, 16, 4, 20, 0, 0, 8, -8, 0, 0], [0, -18, 0, 0, 0, 0, -164, -2, 84, 84, 8, -2], [0, -12, 0, 0, 0, 0, -44, 40, 35, 35, 12, 40], [-376, 0, -30, 26, -57, 10, 0, 0, 70, -70, 0, 0], [0, 1, 0, 0, 0, 0, 82, -40, 19, 19, 3, -64], [44, 0, 12, 12, 24, 68, 0, 0, 7, -7, 0, 0], [162, 0, 8, -20, 44, -40, 0, 0, 42, -42, 0, 0], [0, 22, 0, 0, 0, 0, 22, 60, -22, -22, -2, -16], [190, 0, 2, -8, 16, 73, 0, 0, -66, 66, 0, 0], [0, 21, 0, 0, 0, 0, 8, -7, 18, 18, -52, 1], [0, -1, 0, 0, 0, 0, 56, -32, -127, -127, -23, 0], [65, 0, -3, -30, -88, -67, 0, 0, 51, -51, 0, 0], [0, -33, 0, 0, 0, 0, -69, -36, -17, -17, 51, -56], [0, 35, 0, 0, 0, 0, -4, 39, -62, -62, 20, -21], [-174, 0, -8, -8, 40, 56, 0, 0, 6, -6, 0, 0], [172, 0, 10, 32, 54, -30, 0, 0, -104, 104, 0, 0], [0, -2, 0, 0, 0, 0, -86, -10, -9, -9, 4, 16], [-116, 0, 0, -4, 55, 22, 0, 0, -64, 64, 0, 0], [0, 16, 0, 0, 0, 0, -26, 0, 75, 75, 4, 42], [-94, 0, -64, 16, -72, 32, 0, 0, 30, -30, 0, 0], [0, 57, 0, 0, 0, 0, 144, 2, -115, -115, -45, -88], [14, 0, -6, -12, 78, -62, 0, 0, 1, -1, 0, 0], [-492, 0, -4, -32, 52, 25, 0, 0, -76, 76, 0, 0], [84, 0, 48, 52, 95, 8, 0, 0, -48, 48, 0, 0], [282, 0, 0, -16, -24, -8, 0, 0, -78, 78, 0, 0], [0, -62, 0, 0, 0, 0, -2, -28, 14, 14, 34, -4], [0, -47, 0, 0, 0, 0, -16, 21, -114, -114, 28, -41], [0, -43, 0, 0, 0, 0, 107, -9, -12, -12, 20, 72], [0, 21, 0, 0, 0, 0, -16, -86, 69, 69, -37, 80], [-195, 0, 35, -44, 18, 21, 0, 0, 37, -37, 0, 0], [0, -21, 0, 0, 0, 0, 4, -25, 72, 72, 28, 7], [82, 0, -82, 22, -12, 66, 0, 0, 46, -46, 0, 0], [-268, 0, 28, 0, -65, -10, 0, 0, 116, -116, 0, 0], [-21, 0, 1, -8, -40, 55, 0, 0, 71, -71, 0, 0], [-376, 0, 54, -2, 29, -6, 0, 0, -54, 54, 0, 0], [0, -4, 0, 0, 0, 0, -204, 44, -36, -36, -40, 0], [0, -3, 0, 0, 0, 0, -11, 40, -155, -155, 29, -12], [318, 0, -16, -8, -16, 48, 0, 0, -50, 50, 0, 0], [0, 24, 0, 0, 0, 0, 32, 68, -84, -84, 52, -76], [-132, 0, -48, -20, 28, 40, 0, 0, -25, 25, 0, 0], [678, 0, -2, -36, -43, -10, 0, 0, 50, -50, 0, 0], [0, 25, 0, 0, 0, 0, -113, 59, 4, 4, 28, -40], [180, 0, 16, -12, -84, 21, 0, 0, -48, 48, 0, 0], [0, 22, 0, 0, 0, 0, 257, -53, -15, -15, -50, 88], [0, -3, 0, 0, 0, 0, -185, 39, 56, 56, 52, 40], [-767, 0, -39, 30, -76, 5, 0, 0, 71, -71, 0, 0], [0, 67, 0, 0, 0, 0, -159, 44, -29, -29, 23, -52], [0, -39, 0, 0, 0, 0, -100, 25, -74, -74, -8, 43], [198, 0, -60, 0, -20, 156, 0, 0, -32, 32, 0, 0], [0, 24, 0, 0, 0, 0, -42, 72, -11, -11, 36, -22], [0, -46, 0, 0, 0, 0, -77, 85, -131, -131, 60, -36], [6, 0, 32, 36, -12, -32, 0, 0, -88, 88, 0, 0], [0, 68, 0, 0, 0, 0, -176, -36, -68, -68, 0, -20], [0, 58, 0, 0, 0, 0, 42, 26, -56, -56, -44, 8], [0, -1, 0, 0, 0, 0, -47, -8, 127, 127, 47, 28], [-230, 0, 2, -18, -88, -42, 0, 0, 110, -110, 0, 0], [0, -5, 0, 0, 0, 0, -6, -98, 63, 63, -15, 80], [-62, 0, 6, -48, -26, 86, 0, 0, -39, 39, 0, 0], [-116, 0, 24, -12, 120, 73, 0, 0, 8, -8, 0, 0], [-554, 0, -40, 24, -56, 48, 0, 0, -28, 28, 0, 0], [332, 0, -64, -4, -42, -65, 0, 0, 80, -80, 0, 0], [0, 56, 0, 0, 0, 0, 57, 35, 79, 79, -12, 56], [0, 27, 0, 0, 0, 0, -188, -33, 28, 28, -44, -7], [0, 25, 0, 0, 0, 0, 35, 107, 26, 26, 20, 16], [119, 0, 27, 14, 146, 75, 0, 0, -43, 43, 0, 0], [412, 0, 16, -44, 4, 56, 0, 0, 19, -19, 0, 0], [0, -75, 0, 0, 0, 0, -64, 45, 46, 46, 72, 117], [96, 0, 42, 10, -37, -72, 0, 0, -90, 90, 0, 0], [-410, 0, -20, -20, -8, 20, 0, 0, 56, -56, 0, 0], [0, 0, 0, 0, 0, 0, -210, 50, -50, -50, 76, -84], [0, 18, 0, 0, 0, 0, -34, 42, 144, 144, 20, 52], [-146, 0, -70, 0, -107, 166, 0, 0, -74, 74, 0, 0], [0, -83, 0, 0, 0, 0, -26, -10, -99, -99, -9, 8], [378, 0, 38, 0, -42, -26, 0, 0, -105, 105, 0, 0], [-524, 0, -8, -4, -45, 20, 0, 0, 120, -120, 0, 0], [0, -53, 0, 0, 0, 0, 1, 45, -26, -26, 16, -52], [-426, 0, 88, -48, 88, -8, 0, 0, -8, 8, 0, 0], [0, -23, 0, 0, 0, 0, -84, -15, 184, 184, 16, 71], [0, -7, 0, 0, 0, 0, 15, -37, 78, 78, -4, 128], [145, 0, -47, -26, -160, 53, 0, 0, -17, 17, 0, 0], [0, 0, -48, 32, 128, 96, 0, 0, -153, 153, 0, 0], [0, 9, 0, 0, 0, 0, -131, -104, -7, -7, 9, 104], [0, 11, 0, 0, 0, 0, 60, -125, -28, -28, 16, 117], [62, 0, 24, -28, 36, -24, 0, 0, -144, 144, 0, 0], [0, -58, 0, 0, 0, 0, -91, -141, -7, -7, -2, 16], [0, 30, 0, 0, 0, 0, -54, 42, 23, 23, -56, -96], [0, -7, 0, 0, 0, 0, -209, -44, -35, -35, 33, -44], [-364, 0, -74, 10, 131, -50, 0, 0, -14, 14, 0, 0], [-426, 0, 30, 38, 84, 82, 0, 0, -70, 70, 0, 0], [0, -81, 0, 0, 0, 0, 174, 0, 21, 21, 61, 8], [0, 44, 0, 0, 0, 0, -64, -10, -6, -6, 30, -46], [-578, 0, 6, 4, -70, -2, 0, 0, 103, -103, 0, 0], [306, 0, 62, 24, 108, -51, 0, 0, -30, 30, 0, 0], [736, 0, 92, -36, 47, 56, 0, 0, -124, 124, 0, 0], [0, 62, 0, 0, 0, 0, -16, 2, 100, 100, 10, 64], [-70, 0, -16, 28, 4, -48, 0, 0, 64, -64, 0, 0], [362, 0, -34, 16, 118, 19, 0, 0, -110, 110, 0, 0], [-586, 0, -10, 66, -80, 34, 0, 0, -28, 28, 0, 0], [-343, 0, -59, -78, -60, -19, 0, 0, -21, 21, 0, 0], [0, -60, 0, 0, 0, 0, 210, -68, 55, 55, 52, 66], [-66, 0, 28, 24, 148, -44, 0, 0, 106, -106, 0, 0], [0, 35, 0, 0, 0, 0, 253, -48, -5, -5, -85, 56], [570, 0, -38, 18, -28, 6, 0, 0, -68, 68, 0, 0], [298, 0, -86, 28, -158, -61, 0, 0, 118, -118, 0, 0], [-1228, 0, 18, 38, -81, -26, 0, 0, -42, 42, 0, 0], [-206, 0, -92, 80, -20, 108, 0, 0, -32, 32, 0, 0], [0, 91, 0, 0, 0, 0, 57, -23, -174, -174, -60, -104], [0, -106, 0, 0, 0, 0, -110, 52, 42, 42, 70, 80], [-470, 0, 42, -4, -116, 53, 0, 0, -90, 90, 0, 0], [0, -8, 0, 0, 0, 0, 137, -33, -7, -7, 78, -60], [0, -31, 0, 0, 0, 0, 192, -51, -76, -76, -28, -89], [0, 87, 0, 0, 0, 0, 16, 38, -25, -25, 17, -48], [0, -71, 0, 0, 0, 0, -149, 28, 229, 229, -79, 164], [170, 0, -40, 8, -168, 40, 0, 0, 28, -28, 0, 0], [100, 0, 56, -52, 187, 178, 0, 0, -232, 232, 0, 0], [365, 0, 41, 74, -26, -41, 0, 0, -57, 57, 0, 0], [280, 0, 30, 44, -58, -66, 0, 0, 152, -152, 0, 0], [0, -8, 0, 0, 0, 0, 148, -28, -33, -33, -12, 60], [0, 66, 0, 0, 0, 0, 17, 99, -27, -27, -22, -168], [0, -38, 0, 0, 0, 0, -392, 90, 188, 188, 50, -64], [788, 0, 34, -74, -17, 78, 0, 0, 70, -70, 0, 0], [0, 73, 0, 0, 0, 0, 32, -24, 75, 75, -13, 248], [244, 0, -8, 28, 220, 1, 0, 0, -136, 136, 0, 0], [-814, 0, 52, -84, 56, -172, 0, 0, -48, 48, 0, 0], [0, 41, 0, 0, 0, 0, 155, -177, 50, 50, -96, 56], [0, 34, 0, 0, 0, 0, 112, -118, 72, 72, -106, 72], [-574, 0, 14, 24, 102, 163, 0, 0, -78, 78, 0, 0], [0, -106, 0, 0, 0, 0, 101, -17, 155, 155, 16, 44], [0, 117, 0, 0, 0, 0, 80, -12, -125, -125, -17, -240], [225, 0, 23, -100, 74, -155, 0, 0, 17, -17, 0, 0], [0, 81, 0, 0, 0, 0, -8, -111, 8, 8, 0, 19], [-962, 0, 24, -40, -72, 72, 0, 0, -88, 88, 0, 0], [-253, 0, -9, 38, 140, -123, 0, 0, 57, -57, 0, 0], [36, 0, 50, 92, 66, 34, 0, 0, -20, 20, 0, 0], [0, -30, 0, 0, 0, 0, -152, -134, 129, 129, 8, 74], [0, -78, 0, 0, 0, 0, 73, 3, 83, 83, -44, 76], [310, 0, 92, -84, 16, -68, 0, 0, -6, 6, 0, 0], [-40, 0, -58, -66, -121, -40, 0, 0, 42, -42, 0, 0], [0, -46, 0, 0, 0, 0, -156, -86, 171, 171, -64, 54], [0, -82, 0, 0, 0, 0, -324, 102, 44, 44, 112, -154], [116, 0, 0, 4, -90, 107, 0, 0, -64, 64, 0, 0], [854, 0, -38, -88, -203, -18, 0, 0, 6, -6, 0, 0], [254, 0, -20, 84, -24, 28, 0, 0, -110, 110, 0, 0], [0, 11, 0, 0, 0, 0, 180, -17, -116, -116, 4, -145], [0, 27, 0, 0, 0, 0, -51, -67, 100, 100, -88, 112], [0, -81, 0, 0, 0, 0, -120, 148, 17, 17, -67, 80], [-120, 0, 52, 52, 40, -132, 0, 0, 71, -71, 0, 0], [114, 0, -106, 42, 16, 50, 0, 0, 82, -82, 0, 0], [276, 0, -16, -108, 3, -114, 0, 0, 48, -48, 0, 0], [0, 40, 0, 0, 0, 0, 92, -128, -71, -71, 0, 60], [-506, 0, -72, -4, 60, 184, 0, 0, -64, 64, 0, 0], [-1028, 0, -64, -20, 89, 52, 0, 0, -96, 96, 0, 0], [0, 30, 0, 0, 0, 0, 254, 90, 40, 40, -48, 40], [0, -117, 0, 0, 0, 0, 173, 16, 123, 123, 3, 92], [0, -22, 0, 0, 0, 0, -66, 186, -100, -100, -68, -136], [1262, 0, -42, 28, 48, -35, 0, 0, 202, -202, 0, 0], [-836, 0, 94, -70, 119, 46, 0, 0, -134, 134, 0, 0], [490, 0, 116, -60, -24, -44, 0, 0, -64, 64, 0, 0], [-102, 0, -64, -20, 36, 32, 0, 0, 56, -56, 0, 0], [0, 40, 0, 0, 0, 0, 211, 145, -13, -13, 70, -124], [413, 0, -127, 82, 134, 83, 0, 0, -113, 113, 0, 0], [0, -9, 0, 0, 0, 0, -169, -112, -65, -65, -1, 156], [813, 0, 111, 80, -28, -81, 0, 0, -23, 23, 0, 0], [206, 0, -32, -4, 148, 0, 0, 0, -72, 72, 0, 0], [-72, 0, 46, 6, -75, 30, 0, 0, -94, 94, 0, 0], [0, 92, 0, 0, 0, 0, -26, -38, -166, -166, 16, -52], [0, 42, 0, 0, 0, 0, 142, 92, -46, -46, -30, 150], [0, -36, 0, 0, 0, 0, -448, 128, 75, 75, -44, -28], [0, 41, 0, 0, 0, 0, 171, -56, -7, -7, -79, -240], [594, 0, 38, 30, 12, 106, 0, 0, -18, 18, 0, 0], [412, 0, -56, 12, -108, 176, 0, 0, -3, 3, 0, 0], [748, 0, 0, -4, 83, -164, 0, 0, -176, 176, 0, 0], [0, -19, 0, 0, 0, 0, 179, 191, -78, -78, 20, -76], [0, -100, 0, 0, 0, 0, -235, -69, 169, 169, 66, -44], [0, 47, 0, 0, 0, 0, 260, -129, 84, 84, -40, 99], [-1838, 0, 10, 36, 30, -62, 0, 0, -137, 137, 0, 0], [0, -67, 0, 0, 0, 0, -131, 60, 29, 29, 65, 8], [0, -18, 0, 0, 0, 0, 92, 14, 71, 71, -8, 58], [0, -10, 0, 0, 0, 0, 153, -73, -143, -143, -102, 144], [-488, 0, -6, -78, 29, 22, 0, 0, -74, 74, 0, 0], [0, -40, 0, 0, 0, 0, 88, -126, 46, 46, 94, 106], [0, 36, 0, 0, 0, 0, 316, -44, -181, -181, 24, -56], [0, -1, 0, 0, 0, 0, -153, 68, 11, 11, -113, 96]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_1440_j_Hecke( : Kf := Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_1440_3_j_d();".
// 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_1440_3_j_d(:prec:=12)
    chi := MakeCharacter_1440_j();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 3));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(1999) - 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_1440_3_j_d();".
// 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_1440_3_j_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1440_j();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<7,R![86272, -59648, 9232, 704, -200, 0, 1]>,<23,R![67145728, -14882816, 180992, 49152, -1104, -40, 1]>],Snew);
    return Vf;
end function;