
// Make newform 483.2.i.g in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_483_i();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_483_i_Hecke();"
// To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
// To make the newform (type ModFrm), type "MakeNewformModFrm_483_2_i_g();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_483_2_i_g();".
// 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 ConvertToHeckeField(input: pass_field := false, Kf := [])
    if not pass_field then
        poly := [6400, 2960, 12649, 383, 15176, 265, 8993, -158, 3741, -47, 929, -50, 161, -7, 16, -1, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-21126534364691541271520, -36429158393557767027461, -13115209331314937492827, -40662880506656600462384, 2194297061269817695195, -23885699882955850201917, 5350053001764707687942, -6528849731796473787609, 2549173510407032663203, -1301862983958083383101, 498717248495520599930, -114737068170720275469, 58504771735189737963, -6884602150261440304, 2877632859699594789, 489314876170653131], [326485123714847271188, 20320246137469222800, -3514392651161626455, 62321311775619753656, -19084021506243017904, 46218521419258600752, -26318672382549128250, 22727111648800356108, -6619957156550926992, 6613806712314092352, -1774318828702555233, 1251126373131039744, -195067167613471280, 135181850968244616, -19472619575046966, 8651766457060096], [2406944155975240387440, -3857932148265258928889, 13823656957330199096657, -7113260702154613139976, 6963056131282902064455, -4912525342040631135153, 3438736528426367926718, -2251511627418538855021, 849178320825222363087, -629893818237383249649, 186729210322786143890, -113979986624630191921, 20033340797220336087, -12023254610866269136, 1760264332511008401, -730342106328004561], [-58427368506240364880, -57109459883826673600, -67252064433470884540, -176292224800672810544, -49630138793489800972, -89457459868247790914, -20693015252088923524, -41541780945331790076, -6008727404431577596, -10185653022847576859, -607424981766662344, -1877651312579823948, -45063656177231780, -186511825661553802, 4222261370227452, -12874027827287548], [-5311320394108012294400, 3375194199086203826465, -7056673398704053749329, 3124696748514948905992, -4923920951264373761823, 1954539971208080687025, -1754341495943223718718, 796976481895316064109, -425501062805963035599, 206610188649281339121, -73172805285822608978, 33907898744243648305, -7549042069958174167, 3371616148898613712, -514016679708002577, 176629053076158417], [-36981248440812946694400, 18101351853785260990833, -47256397130882187712129, 25340664685060108284872, -34615848082827694480935, 17079396076094111445041, -9994588985317586395046, 8610364965781190044877, -1994832573743560473039, 2074438367360940997553, -243755343368410296650, 355684555011313854737, -20023363027746932439, 32541743308144375832, -892608534935747497, 1990481780621992017], [-375696728354443679418, -35719637487542161200, 382827975341476926845, -448316108161737896000, 537828881712279372410, -278719953895353618745, 437289602831923128039, -149006442271052472906, 131835695108422278818, -52219127545580459425, 30437002962504678345, -10201178214071112342, 3388229179044614558, -1182133815949820917, 280864108697835052, -68862515097890950], [-2406944155975240387440, 3857932148265258928889, -11779262448282761204717, 7113260702154613139976, -6963056131282902064455, 4912525342040631135153, -3438736528426367926718, 2251511627418538855021, -849178320825222363087, 629893818237383249649, -186729210322786143890, 113979986624630191921, -20033340797220336087, 12023254610866269136, -1760264332511008401, 730342106328004561], [1617875710154318213080, -25558337389001352064999, -2216141300764903538693, -32363147275523802428876, 1777368612314732230825, -22799600743619327584383, 15053501726201448178, -8914990132760330976511, 373989125175825256177, -2145766677577365257439, 103570869247560874150, -328185435331309965811, 17005084627917901257, -30418784632791464096, 1308208354551848691, -1493096424743868911], [-33285552629352457301840, -24254147880130243329463, -54833388125285265941241, -49441103395432417238112, -35594116643551721289655, -39132037154857671577951, -12884421364697389898374, -16940508891835892525947, -2389455948755203148671, -4341323539653214643743, -143849160888437465770, -732474535305719009767, 5073656239697606329, -72491084357911351632, 2948565287745468527, -4244463682271324767], [-18433946269191271174400, -28997717432180621382647, -17793828449400485530929, 26701563288582634420472, -12165220077269899454775, 23274198018655780556641, 224274810090053004154, 15642539697531252087837, 1087660854111020324001, 3965049750376255211233, 208887873099685436470, 766941351734913617937, 24695737262458158041, 74265424757468254752, 105066438082346983, 5336359747375319137], [490727858227952821250, 196329848887636976800, 68006887506055600170, 589891157971935879498, -47872510994473140960, 393095261321858854240, -113921171335612123910, 190062165014009870904, -31421811615920590752, 52948379957753469757, -9747877234313079770, 9921935315434061568, -1115046838584202823, 1050412635125966928, -121374370496863868, 68020894021064526], [761247511315299727062, 1052686454348098798000, 1640526067702568741675, 2197365631174578900614, 1451548536747267436076, 1438769630275880390202, 811446374720153081263, 649658393051330338944, 238689839627235297980, 146811629178910485156, 40272164728359612577, 26093614209699680316, 4034463201465252080, 2432658535035399818, 184674370801341722, 176930487264112036], [6244503128971517652880, -15933532865158649475461, -4740079011825765673027, 15772016567136634299856, -1095405802718313611045, 16482215978867850480003, -3346972546214658454258, 12943120061904193083591, -323982902425894602077, 4144766640720614645379, -426380885780929683550, 893951122460543165811, -53595123591584353077, 99573166185059135696, -8957806889978802411, 7233783127086583691]];
    Rf_basisdens := [1, 1, 8177578036189751567760, 102219725452371894597, 8177578036189751567760, 102219725452371894597, 817757803618975156776, 8177578036189751567760, 204439450904743789194, 2044394509047437891940, 4088789018094875783880, 8177578036189751567760, 8177578036189751567760, 102219725452371894597, 204439450904743789194, 8177578036189751567760];
    Rf_basisnums := ChangeUniverse([[z : z in elt] : elt in Rf_num], Kf);
    Rfbasis := [Rf_basisnums[i]/Rf_basisdens[i] : i in [1..Degree(Kf)]];
    inp_vec := Vector(Rfbasis)*ChangeRing(Transpose(Matrix([[elt : elt in row] : row in input])),Kf);
    return Eltseq(inp_vec);
end function;


// To make the character of type GrpDrchElt, type "MakeCharacter_483_i();"
function MakeCharacter_483_i()
    N := 483;
    order := 3;
    char_gens := [323, 346, 442];
    v := [3, 2, 3];
    // 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;

// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_483_i_Hecke();"
function MakeCharacter_483_i_Hecke(Kf)
    N := 483;
    order := 3;
    char_gens := [323, 346, 442];
    char_values := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
    assert UnitGenerators(DirichletGroup(N)) eq char_gens;
    values := ConvertToHeckeField(char_values : pass_field := true, Kf := Kf); // the value of chi on the gens as elements in the Hecke field
    F := Universe(values);// the Hecke field
    chi := DirichletCharacterFromValuesOnUnitGenerators(DirichletGroup(N,F),values);
    return chi;
end function;


function ExtendMultiplicatively(weight, aps, character)
    prec := NextPrime(NthPrime(#aps)) - 1; // we will able to figure out a_0 ... a_prec
    primes := PrimesUpTo(prec);
    prime_powers := primes;
    assert #primes eq #aps;
    log_prec := Floor(Log(prec)/Log(2)); // prec < 2^(log_prec+1)
    F := Universe(aps);
    FXY<X, Y> := PolynomialRing(F, 2);
    // 1/(1 - a_p T + p^(weight - 1) * char(p) T^2) = 1 + a_p T + a_{p^2} T^2 + ...
    R<T> := PowerSeriesRing(FXY : Precision := log_prec + 1);
    recursion := Coefficients(1/(1 - X*T + Y*T^2));
    coeffs := [F!0: i in [1..(prec+1)]];
    coeffs[1] := 1; //a_1
    for i := 1 to #primes do
        p := primes[i];
        coeffs[p] := aps[i];
        b := p^(weight - 1) * F!character(p);
        r := 2;
        p_power := p * p;
        //deals with powers of p
        while p_power le prec do
            Append(~prime_powers, p_power);
            coeffs[p_power] := Evaluate(recursion[r + 1], [aps[i], b]);
            p_power *:= p;
            r +:= 1;
        end while;    
    end for;
    Sort(~prime_powers);
    for pp in prime_powers do
        for k := 1 to Floor(prec/pp) do
            if GCD(k, pp) eq 1 then
                coeffs[pp*k] := coeffs[pp]*coeffs[k];
            end if;
        end for;
    end for;
    return coeffs;
end function;


function qexpCoeffs()
    // To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
    weight := 2;
    raw_aps := [[0, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [-1, -1, -1, 0, -1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, -1], [-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0], [-2, 1, 0, 0, -2, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, 0], [0, 0, -1, 0, 1, 0, 0, -2, 2, 0, -1, 2, 1, 0, -1, 2], [0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, -1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, -1, -1, 1], [1, 1, 0, 1, 1, 0, 1, 0, 0, -1, 1, -1, -1, 0, 0, 0], [0, 2, 1, 0, 1, -2, 0, 0, 0, -2, 1, -1, -1, 0, 1, -1], [2, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0], [3, 0, -1, 0, 0, -1, 0, 0, -2, 0, 1, 1, 0, -1, 0, 0], [0, -2, -1, 0, 0, 2, 1, 0, 0, 0, -1, 1, 1, 1, -1, 1], [0, 0, -1, 0, 0, 0, 1, -1, 0, 0, 0, 1, 0, 0, 0, -1], [-4, 2, 2, 1, -4, 0, 0, 0, 0, -1, -1, -1, 1, 0, 0, 2], [0, -1, 0, 0, -1, 1, -2, 1, -1, 0, 0, -1, 0, -2, 0, -1], [-5, -1, 2, 0, -5, 0, 0, -1, 0, 0, -1, -1, 0, 0, 0, 2], [-2, 0, -1, 2, 0, 0, 0, 0, 4, 0, -2, -2, 0, 0, -3, 3], [-1, 3, 0, 1, -1, 0, 1, 2, 0, -1, 2, -2, -2, 0, 0, 0], [0, 0, 1, 0, 1, 0, -2, 4, -4, -2, 1, 0, -1, -2, 1, 0], [6, 0, -2, -2, 0, -2, 0, 0, 0, 0, 2, 2, 0, 0, 2, 0], [0, -2, -2, 0, 2, 2, 0, -2, 2, -4, -2, 1, 0, 0, 0, 1], [3, 0, 0, -4, 0, 0, 0, 0, -1, 0, 1, 1, 0, -1, 1, -1], [2, 3, 2, 0, 2, 0, 1, 0, 0, 0, -1, -1, -1, 0, 0, 2], [0, 0, 2, 0, -1, 0, 1, 5, -5, 0, 2, -3, -1, 1, 1, -3], [0, 3, 0, 0, 5, -3, 0, 1, -1, 0, 0, -1, 0, 0, 0, -1], [1, -1, -2, 0, 1, 0, 1, -4, 0, 0, 0, 2, 0, 0, 0, -2], [-1, 0, -1, 0, 0, 0, 0, 0, -2, 0, 1, 1, 0, 0, -1, 0], [1, 0, -1, 0, 0, 0, 0, 0, 0, 0, -2, -2, 0, 0, -3, 3], [0, 0, 3, 0, 2, 0, 0, 2, -2, -2, 3, -1, -3, 0, 3, -1], [-4, 5, 2, 6, -4, 0, -2, 3, 0, -6, 0, -2, -1, 0, 0, 2], [-3, 0, -3, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, -1, 3], [0, 1, 0, 0, -2, -1, 0, -1, 1, -2, 0, 0, -3, 0, 3, 0], [-2, -1, 0, 0, -2, 0, -3, 2, 0, 0, -1, 1, -1, 0, 0, 0], [9, 0, 1, -4, 9, 0, 1, -1, 0, 4, -2, 1, 3, 0, 0, 1], [0, -1, 0, 0, 4, 1, 1, 0, 0, -1, 0, 0, 2, 1, -2, 0], [2, 0, -1, -1, 0, 1, 0, 0, 0, 0, 0, 0, 0, -1, 3, 1], [0, 0, 1, 0, 0, 0, 2, 2, -2, 1, 1, -1, -1, 2, 1, -1], [-2, 4, 0, 0, -2, 0, -1, 2, 0, 0, 3, -3, -1, 0, 0, 0], [-5, 0, 2, -2, 0, 3, 0, 0, -2, 0, -2, -2, 0, 1, 0, 0], [0, -1, 1, 0, 8, 1, 1, -4, 4, -2, 1, -3, -1, 1, 1, -3], [3, -6, 0, -3, 3, 0, -1, 0, 0, 3, -3, 3, -1, 0, 0, 0], [-6, 0, 1, 3, 0, -2, 0, 0, 2, 0, 0, 0, 0, 0, 1, -1], [-2, 0, 3, 0, -2, 0, 0, 4, 0, 0, -1, -2, -4, 0, 0, 3], [0, 0, -4, 3, 0, -3, 0, 0, 4, 0, 2, 2, 0, 1, -4, 2], [0, 0, 0, -3, 0, 1, 0, 0, -2, 0, 2, 2, 0, -3, 2, -2], [-5, 0, 3, -2, -5, 0, 1, -1, 0, 2, 0, -3, -3, 0, 0, 3], [0, 2, 3, 0, 3, -2, 0, -2, 2, 0, 3, 1, -1, 0, 1, 1], [0, 3, 0, 0, -2, -3, 1, -2, 2, -3, 0, 0, 0, 1, 0, 0], [6, 0, -2, -4, 0, -6, 0, 0, 2, 0, 6, 6, 0, 4, 0, -4], [9, 4, -1, 4, 9, 0, -1, 1, 0, -4, 0, 1, 1, 0, 0, -1], [-4, 0, 1, 0, 0, -5, 0, 0, -2, 0, 2, 2, 0, -1, 1, -3], [0, 0, -2, 0, 6, 0, 0, -6, 6, 2, -2, 0, 2, 0, -2, 0], [-1, 2, 1, 2, -1, 0, 1, -1, 0, -2, -2, 1, 3, 0, 0, 1], [6, -5, -2, 0, 6, 0, -1, 2, 0, 0, 1, 1, -1, 0, 0, -2], [0, 2, 1, 0, -6, -2, 0, 0, 0, -5, 1, 1, 1, 0, -1, 1], [-1, 2, 0, 2, -1, 0, 2, 2, 0, -2, 4, -4, -2, 0, 0, 0], [0, 0, 2, 0, 0, 0, 0, 0, 1, 0, -3, -3, 0, 1, 2, 1], [1, -2, -1, -2, 1, 0, 1, -3, 0, 2, -1, 2, 3, 0, 0, -1], [9, 0, -3, -4, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, -3, -2], [1, 0, -3, 5, 0, 1, 0, 0, -2, 0, 0, 0, 0, 1, -5, 3], [0, 0, -2, 1, 0, 0, 1, -2, 0, -1, 2, 0, -2, 0, 0, -2], [0, 2, 2, 0, -8, -2, 1, 5, -5, -6, 2, -3, -2, 1, 2, -3], [0, 0, 0, 0, -8, 0, -2, 4, -4, 2, 0, 0, -2, -2, 2, 0], [0, 2, 3, 0, 9, -2, 0, 0, 0, 2, 3, 1, 3, 0, -3, 1], [6, 0, 3, 0, 0, 2, 0, 0, -1, 0, -1, -1, 0, 1, 0, -2], [-4, 8, 2, 1, -4, 0, 3, -4, 0, -1, 0, -2, 0, 0, 0, 2], [-4, 0, 5, -1, 0, -3, 0, 0, -4, 0, 2, 2, 0, 2, 5, -7], [-10, -5, 0, -2, -10, 0, -1, 2, 0, 2, -3, 3, 3, 0, 0, 0], [0, -2, 0, 0, 10, 2, 2, -2, 2, 6, 0, 4, 2, 2, -2, 4], [-3, 7, 2, 0, -3, 0, -2, -1, 0, 0, 1, -3, 0, 0, 0, 2], [0, -8, 0, 0, 16, 8, 3, -5, 5, 4, 0, -1, 2, 3, -2, -1], [0, 0, -3, 0, 0, 2, 0, 0, 6, 0, 0, 0, 0, 2, 2, 3], [0, 4, -1, 0, -1, -4, -3, 1, -1, -2, -1, -2, -1, -3, 1, -2], [-2, 4, -1, 2, -2, 0, 0, -4, 0, -2, -1, 2, 4, 0, 0, -1], [0, -4, 0, 0, 3, 4, 0, 0, 0, 2, 0, -4, 4, 0, -4, -4], [0, -1, -6, 0, 2, 1, -4, -1, 1, -2, -6, 2, 1, -4, -1, 2], [7, 0, 0, 3, 7, 0, -1, -2, 0, -3, -1, 1, 5, 0, 0, 0], [-4, 0, -6, 2, 0, 0, 0, 0, 2, 0, 4, 4, 0, 0, -4, 2], [2, 0, -1, -6, 0, -6, 0, 0, -1, 0, 1, 1, 0, -5, 2, 0], [-3, 3, -1, 4, -3, 0, 2, 1, 0, -4, 1, 0, 0, 0, 0, -1], [2, 0, 2, 0, 0, 1, 0, 0, -3, 0, -1, -1, 0, -6, 1, -1], [0, 3, 1, 0, -8, -3, 3, -2, 2, 2, 1, -3, 3, 3, -3, -3], [0, -5, -1, 0, 10, 5, -3, 6, -6, -3, -1, -1, 5, -3, -5, -1], [-10, 0, 1, 0, 0, 7, 0, 0, 0, 0, -6, -6, 0, -3, 1, 5], [0, -3, -3, 0, 6, 3, 2, -3, 3, -4, -3, 6, 5, 2, -5, 6], [18, 0, 4, 0, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 2, -4], [-9, 0, 6, 3, 0, 8, 0, 0, -4, 0, -6, -6, 0, 0, -4, 0], [0, 1, 5, 0, -18, -1, 3, 4, -4, -2, 5, -3, -7, 3, 7, -3], [0, -7, 0, 4, 0, 0, 1, 2, 0, -4, 1, -1, -3, 0, 0, 0], [11, -4, 2, -3, 11, 0, 2, -2, 0, 3, 0, -2, 6, 0, 0, 2], [20, 0, 2, -3, 0, -6, 0, 0, 2, 0, 2, 2, 0, 3, 2, -4], [0, -7, -1, 0, 11, 7, -3, 2, -2, 1, -1, -3, -1, -3, 1, -3], [2, 0, -3, 8, 0, 5, 0, 0, 6, 0, 2, 2, 0, 1, 1, 1], [0, 3, 1, 0, -4, -3, 1, 0, 0, 6, 1, 5, -3, 1, 3, 5], [-1, 6, -1, 0, -1, 0, -2, 6, 0, 0, 1, 0, -1, 0, 0, -1], [0, -5, -11, 0, -9, 5, -2, -7, 7, 6, -11, 7, 4, -2, -4, 7], [0, 0, -4, 0, 3, 0, 1, -8, 8, 6, -4, 2, 4, 1, -4, 2], [-10, 0, -3, 1, 0, 6, 0, 0, -2, 0, -2, -2, 0, -2, -1, 5], [4, -12, -1, -2, 4, 0, 0, -4, 0, 2, -3, 4, 2, 0, 0, -1], [-1, -2, 3, 0, -1, 0, -3, 3, 0, 0, -2, -1, 1, 0, 0, 3], [0, -2, 0, 0, 1, 2, 0, 2, -2, 2, 0, 1, -5, 0, 5, 1], [-22, -6, -2, 0, -22, 0, 2, 2, 0, 0, -1, 3, 2, 0, 0, -2], [11, -3, 0, -1, 11, 0, 1, -2, 0, 1, 1, -1, 1, 0, 0, 0], [10, 0, 1, -6, 0, -4, 0, 0, 2, 0, 2, 2, 0, 4, 1, -3], [0, -3, 2, 0, 2, 3, -1, 4, -4, -1, 2, 2, -4, -1, 4, 2], [-16, 1, 2, 7, -16, 0, -1, 0, 0, -7, -3, 1, 7, 0, 0, 2], [-3, 0, -5, 1, 0, -5, 0, 0, 8, 0, 2, 2, 0, 3, -7, 3], [0, 3, 0, 0, -3, -3, 3, -8, 8, -4, 0, -4, 0, 3, 0, -4], [10, -5, -4, 2, 10, 0, 3, 0, 0, -2, 1, 3, 1, 0, 0, -4], [3, 0, 3, -2, 0, 0, 0, 0, 0, 0, -5, -5, 0, -4, -1, 2], [2, 0, 1, 2, 2, 0, 0, -2, 0, -2, -2, 1, 6, 0, 0, 1], [-1, 0, -3, 2, 0, 1, 0, 0, 0, 0, 4, 4, 0, -3, 2, -1], [-4, 0, 5, 2, -4, 0, 3, -3, 0, -2, -6, 1, -2, 0, 0, 5], [9, 0, -3, 2, 0, 1, 0, 0, 8, 0, 1, 1, 0, 5, -6, 2], [-8, -8, 2, -1, -8, 0, 2, 8, 0, 1, -1, -1, 1, 0, 0, 2], [0, 5, 0, 0, -4, -5, -3, -6, 6, -1, 0, 0, -2, -3, 2, 0], [0, 0, -5, 6, 0, 9, 0, 0, 0, 0, 0, 0, 0, 1, -3, 5], [7, 8, 4, 0, 7, 0, 2, -6, 0, 0, -3, -1, 9, 0, 0, 4], [-9, 0, -1, 5, 0, -5, 0, 0, 6, 0, 0, 0, 0, 1, -1, 1], [0, 4, -3, 0, 18, -4, 3, 5, -5, 4, -3, -2, 0, 3, 0, -2], [-6, 4, 2, -2, -6, 0, 0, 8, 0, 2, 3, -5, -7, 0, 0, 2], [0, -4, 0, 0, -1, 4, -4, 4, -4, 7, 0, -2, -4, -4, 4, -2], [9, 0, 2, -4, 0, -4, 0, 0, 0, 0, -2, -2, 0, 0, 3, 0], [0, 1, 0, 0, 9, -1, -6, 11, -11, 2, 0, 1, 0, -6, 0, 1], [0, 0, 4, 0, -12, 0, -1, 6, -6, -1, 4, 0, -2, -1, 2, 0], [-5, 0, 2, 0, 0, 0, 0, 0, 0, 0, -3, -3, 0, 0, -7, 1], [0, 7, 4, 0, -7, -7, -1, 4, -4, -2, 4, -4, -4, -1, 4, -4], [-9, -2, 2, -6, -9, 0, 0, 2, 0, 6, -3, 1, 3, 0, 0, 2], [-3, 0, -6, 10, 0, -4, 0, 0, 9, 0, 5, 5, 0, 3, -3, 1], [0, 3, -6, 0, 9, -3, 3, -4, 4, 0, -6, 7, 2, 3, -2, 7], [-11, 0, -1, -8, 0, 3, 0, 0, -5, 0, 5, 5, 0, -2, 4, -4], [0, -1, -6, 0, 12, 1, -3, -2, 2, 1, -6, 2, 0, -3, 0, 2], [-5, 0, 1, -2, 0, -6, 0, 0, -6, 0, 4, 4, 0, -2, 9, -5], [4, -12, -1, 4, 4, 0, -3, -1, 0, -4, 2, -1, 0, 0, 0, -1], [9, 1, 3, -2, 9, 0, -3, 0, 0, 2, 0, -3, 0, 0, 0, 3], [-16, 0, 4, -4, 0, 1, 0, 0, -3, 0, -2, -2, 0, 0, 1, -2], [22, -7, -2, -2, 22, 0, 1, -6, 0, 2, 3, -1, 1, 0, 0, -2], [-2, 0, 4, 1, 0, 13, 0, 0, -2, 0, -2, -2, 0, -1, 0, -2], [0, 1, 3, 0, -12, -1, 1, 0, 0, -6, 3, -5, -7, 1, 7, -5], [18, 3, -4, 5, 18, 0, -1, 2, 0, -5, 4, 0, 6, 0, 0, -4], [-2, 0, -2, 2, 0, -2, 0, 0, 8, 0, -4, -4, 0, 2, -12, 6], [5, 0, -2, -1, 5, 0, -1, 2, 0, 1, 5, -3, -5, 0, 0, -2], [-4, 0, -2, 12, 0, 12, 0, 0, 2, 0, -6, -6, 0, 0, -4, 8], [21, 0, 4, -2, 0, -7, 0, 0, 0, 0, 0, 0, 0, 5, 4, -4], [-14, -6, 2, -1, -14, 0, 6, -4, 0, 1, -3, 1, -1, 0, 0, 2], [0, -11, -1, 0, -10, 11, 1, 6, -6, 2, -1, -5, -5, 1, 5, -5], [0, 10, 7, 0, -12, -10, -1, 8, -8, -12, 7, -5, -3, -1, 3, -5], [0, 2, 8, 0, -12, -2, 2, 2, -2, -7, 8, -8, -8, 2, 8, -8], [-2, 0, -4, -4, 0, 4, 0, 0, 13, 0, -3, -3, 0, -1, -6, 7], [-9, 0, 4, 1, 0, 4, 0, 0, 4, 0, -10, -10, 0, 2, -2, 6], [0, 0, -7, 0, -2, 0, 4, -2, 2, 7, -7, 7, 9, 4, -9, 7], [17, -10, -3, 0, 17, 0, -3, -11, 0, 0, -5, 8, 3, 0, 0, -3], [-3, 0, -4, 0, 0, 6, 0, 0, 3, 0, -3, -3, 0, -1, 1, 7], [0, -4, 1, 0, 4, 4, 4, 4, -4, -2, 1, -1, -6, 4, 6, -1], [0, 9, 2, 0, 8, -9, 1, 0, 0, 7, 2, 6, 4, 1, -4, 6], [-12, 0, -7, 4, 0, -4, 0, 0, 1, 0, 5, 5, 0, -1, -2, 2], [18, 2, -3, 6, 18, 0, -2, 4, 0, -6, 7, -4, -2, 0, 0, -3], [0, 12, 6, 0, -2, -12, 5, -4, 4, -9, 6, 0, 0, 5, 0, 0], [2, 0, -1, 10, 0, -2, 0, 0, -2, 0, 1, 1, 0, 2, 2, 0], [11, 0, -4, -1, 0, 10, 0, 0, 10, 0, -2, -2, 0, 4, -4, 6], [0, 4, 5, 0, -15, -4, 1, 7, -7, -4, 5, -8, -7, 1, 7, -8], [15, -16, -2, -2, 15, 0, -2, 0, 0, 2, -2, 4, 1, 0, 0, -2], [8, -14, -4, -4, 8, 0, -4, 6, 0, 4, 0, 4, 2, 0, 0, -4], [-5, -2, 0, 9, -5, 0, 0, 4, 0, -9, -2, 2, -2, 0, 0, 0], [13, -1, -2, -9, 13, 0, -7, -2, 0, 9, 3, -1, 7, 0, 0, -2]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_483_i_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_483_2_i_g();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
function MakeNewformModFrm_483_2_i_g(:prec:=16)
    chi := MakeCharacter_483_i();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 2));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(997) - 1;
    while true do
        trunc_vec := Vector(Kf, [0] cat [f_vec[i]: i in [1..prec]]);
        B := Basis(S, prec + 1);
        S_basismat := Matrix([AbsEltseq(g): g in B]);
        if Rank(S_basismat) eq Min(NumberOfRows(S_basismat), NumberOfColumns(S_basismat)) then
            S_basismat := ChangeRing(S_basismat,Kf);
            f_lincom := Solution(S_basismat,trunc_vec);
            f := &+[f_lincom[i]*Basis(S)[i] : i in [1..#Basis(S)]];
            return f;
        end if;
        error if prec eq maxprec, "Unable to distinguish newform within newspace";
        prec := Min(Ceiling(1.25 * prec), maxprec);
    end while;
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_483_2_i_g();".
// 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_483_2_i_g( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_483_i();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![6400, -2960, 12649, -383, 15176, -265, 8993, 158, 3741, 47, 929, 50, 161, 7, 16, 1, 1]>,<5,R![1440000, 2415600, 4401369, 1653417, 2060010, 750009, 641667, 185760, 112233, 28341, 13747, 2790, 995, 149, 46, 5, 1]>,<11,R![19219456, 13397504, 21193472, 8080128, 11675264, 4304512, 3549248, 786176, 523680, 116720, 51088, 8968, 2880, 472, 104, 10, 1]>],Snew);
    return Vf;
end function;