
// Make newform 1805.2.b.k in Magma, downloaded from the LMFDB on 10 May 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1805_b();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1805_2_b_k();".
// 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_1805_b();"
function MakeCharacter_1805_b()
    N := 1805;
    order := 2;
    char_gens := [362, 1446];
    v := [1, 2];
    // 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_1805_b_Hecke(Kf)
    return MakeCharacter_1805_b();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1805_2_b_k();".
// 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_1805_2_b_k( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1805_b();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![19, 0, 783, 0, 10782, 0, 57610, 0, 133557, 0, 166671, 0, 125215, 0, 59871, 0, 18618, 0, 3743, 0, 468, 0, 33, 0, 1]>,<29,R![-263169, 567891, 757431, -286713, -425574, -13797, 65511, 9369, -3600, -756, 45, 18, 1]>],Snew);
    return Vf;
end function;