
// Make newform 322.2.k.a in Magma, downloaded from the LMFDB on 23 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_322_k();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_322_2_k_a();".
// 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".
// To make the character of type GrpDrchElt, type "MakeCharacter_322_k();"
function MakeCharacter_322_k()
    N := 322;
    order := 22;
    char_gens := [185, 281];
    v := [11, 21];
    // 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_322_k_Hecke(Kf)
    return MakeCharacter_322_k();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_322_2_k_a();".
// 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_322_2_k_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_322_k();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![956720690641, 0, -16787189461732, 0, 316420440116826, 0, -3009455621443293, 0, 12800764311994269, 0, -8834400931902104, 0, -92171261830385455, 0, -6965861998672399, 0, 1167805662143743588, 0, 2308526561504032995, 0, 3252938384141376675, 0, 1377086060091264834, 0, 918844403628773639, 0, -929996561377096698, 0, 566930594725653119, 0, -3231115409612338642, 0, 3701386931030819968, 0, -2108394130841025606, 0, 862042472794807617, 0, -294927511364860261, 0, 88515693784781796, 0, -23224673483246467, 0, 5306324693481177, 0, -1077211589749969, 0, 198651591130243, 0, -33009503795534, 0, 5388389517817, 0, -798310711457, 0, 129326404470, 0, -19380228591, 0, 3521959053, 0, -472420459, 0, 59028322, 0, -6314029, 0, 529201, 0, -101532, 0, 17316, 0, -1342, 0, 119, 0, -9, 0, 1]>],Snew);
    return Vf;
end function;