
// Make newform 820.2.bo.b in Magma, downloaded from the LMFDB on 15 September 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_820_bo();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_820_2_bo_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".
// To make the character of type GrpDrchElt, type "MakeCharacter_820_bo();"
function MakeCharacter_820_bo()
    N := 820;
    order := 20;
    char_gens := [411, 657, 621];
    v := [20, 20, 7];
    // 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_bo_Hecke( : Kf := Kf)
    return MakeCharacter_820_bo();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_820_2_bo_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_820_2_bo_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_820_bo();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![169300154521, -2024900800406, 12109331096258, -45755419833892, 190601715348465, -1098223799599778, 5685252898772130, -20589857290536026, 51560690763030174, -89991281944021094, 114496704671261936, -122112780614232846, 149030845190469741, -204859320206156326, 238167366884340020, -203732148040942630, 154673330384181598, -147605820758274460, 159069493141459904, -129043225020317516, 78339212190134192, -51775817803320644, 50850031554927086, -40973553595087492, 22308553568858334, -10439337160354342, 9182640029546836, -7518991639930238, 3884884389950816, -1302260976687292, 1016014811705810, -858381042020358, 433871002693525, -103478430261516, 72076934210094, -63331806225584, 31804357150709, -5279022719920, 3368716437670, -3073460592546, 1541524312269, -173425402330, 104859829916, -98488631406, 49322765565, -3672617494, 2160221002, -2068188938, 1032603007, -49696830, 28737158, -27843732, 13854066, -415488, 234600, -229318, 113871, -1960, 1058, -1044, 519, -4, 2, -2, 1]>],Snew);
    return Vf;
end function;