
// Make newform 820.2.k.c in Magma, downloaded from the LMFDB on 01 September 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_820_k();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_820_2_k_c();".
// 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_820_k();"
function MakeCharacter_820_k()
    N := 820;
    order := 4;
    char_gens := [411, 657, 621];
    v := [2, 3, 4];
    // 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_820_k_Hecke( : Kf := Kf)
    return MakeCharacter_820_k();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_820_2_k_c();".
// 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_820_2_k_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_820_k();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![25600000000, 0, 0, 0, 3391399638097575936, 0, 0, 0, 403199348028168318976, 0, 0, 0, 14528826433682294318080, 0, 0, 0, 173046749636954198087680, 0, 0, 0, 974404539982367037683968, 0, 0, 0, 3116149738621877425474048, 0, 0, 0, 6221209333989698552027648, 0, 0, 0, 8178853454705910945103744, 0, 0, 0, 7314587099766248817156672, 0, 0, 0, 4546716064335870630845440, 0, 0, 0, 1996106546687508779089424, 0, 0, 0, 627437754473946768614368, 0, 0, 0, 142950931954935904227584, 0, 0, 0, 23868523422575067451424, 0, 0, 0, 2948838335713378818136, 0, 0, 0, 271667103221783837104, 0, 0, 0, 18768834381443167212, 0, 0, 0, 975661207139876888, 0, 0, 0, 38191440782610441, 0, 0, 0, 1123299060475016, 0, 0, 0, 24677460607932, 0, 0, 0, 400404054328, 0, 0, 0, 4706920982, 0, 0, 0, 38811208, 0, 0, 0, 212112, 0, 0, 0, 688, 0, 0, 0, 1]>],Snew);
    return Vf;
end function;