
// Make newform 666.2.bs.b in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_666_bs();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_666_2_bs_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_666_bs();"
function MakeCharacter_666_bs()
    N := 666;
    order := 36;
    char_gens := [371, 631];
    v := [18, 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_666_bs_Hecke(Kf)
    return MakeCharacter_666_bs();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_666_2_bs_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_666_2_bs_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_666_bs();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![86613805716200053281, 0, 277446982597350802137108, 0, 203236224623948687603584590, 0, -42226301294268967291748725404, 0, 5621333896231682674465388314251, 0, 17204618319701491351068609357612, 0, 30887837442553136313655073068974, 0, -14048282516526186003421401991392, 0, 59037075588177532899458670245769, 0, 179719620543912811732633595311020, 0, 28674358643451800587960309879440, 0, -34908176886345641089295052112512, 0, -55318869958208846967168611466690, 0, -60593455084574941149102084640476, 0, 56134145218941830016354443291946, 0, -20344473759887310585109474047744, 0, 24323663822485346481312510829524, 0, -14168600896203319167357647811084, 0, 4286004052930602963519010366206, 0, -1169628816311657338814827669116, 0, 238598860467673383456823051932, 0, -55154793404511040249064763936, 0, 17269738839602841542708836062, 0, -1899515878476726152880450288, 0, 404513567068794405673345929, 0, -46472653169009470724878872, 0, 6301850535623969158553190, 0, -689691172388957275426776, 0, 52567190157106246505148, 0, -5233235051629545826392, 0, 208773761208826631400, 0, 9988326382395314556, 0, -3911640662229558129, 0, 514367175223428696, 0, -35811205048673496, 0, 2627865631430820, 0, -480928511268, 0, -21599808048252, 0, 3141789513336, 0, -183722290344, 0, -2868475761, 0, 518678964, 0, -11888208, 0, -906444, 0, 21546, 0, 5904, 0, -108, 0, 0, 0, 1]>],Snew);
    return Vf;
end function;