
// Make newform 390.2.bn.c in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_390_bn();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_390_2_bn_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_390_bn();"
function MakeCharacter_390_bn()
    N := 390;
    order := 12;
    char_gens := [131, 157, 301];
    v := [12, 3, 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;

function MakeCharacter_390_bn_Hecke(Kf)
    return MakeCharacter_390_bn();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_390_2_bn_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_390_2_bn_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_390_bn();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<7,R![65536, 3932160, 101318656, 1360527360, 9564483584, 29035487232, 21387214848, -64875018240, -43005773568, 86978443776, 69309091584, -53162217984, -47501022592, 22302164352, 23470854912, -4460249664, -6665247760, 532790880, 1361172896, 13873104, -185285944, -12424368, 18547412, 2356404, -1213295, -217728, 55822, 14124, -1189, -504, 6, 12, 1]>],Snew);
    return Vf;
end function;