GP/PARI CALCULATOR Version 2.16.1 (development 28651-57fd487) amd64 running linux (x86-64/GMP-6.1.2 kernel) 64-bit version compiled: Aug 9 2023, gcc version 10.2.0 (GCC) threading engine: single (readline v6.3 enabled, extended help enabled) Copyright (C) 2000-2023 The PARI Group PARI/GP is free software, covered by the GNU General Public License, and comes WITHOUT ANY WARRANTY WHATSOEVER. Type ? for help, \q to quit. Type ?18 for how to get moral (and possibly technical) support. parisize = 2000000000, primelimit = 1048576 (09:17) gp > ? Help topics: for a list of relevant subtopics, type ?n for n in 0: user-defined functions (aliases, installed and user functions) 1: PROGRAMMING under GP 2: Standard monadic or dyadic OPERATORS 3: CONVERSIONS and similar elementary functions 4: functions related to COMBINATORICS 5: NUMBER THEORETICAL functions 6: POLYNOMIALS and power series 7: Vectors, matrices, LINEAR ALGEBRA and sets 8: TRANSCENDENTAL functions 9: SUMS, products, integrals and similar functions 10: General NUMBER FIELDS 11: Associative and central simple ALGEBRAS 12: ELLIPTIC CURVES 13: L-FUNCTIONS 14: HYPERGEOMETRIC MOTIVES 15: MODULAR FORMS 16: MODULAR SYMBOLS 17: GRAPHIC functions 18: The PARI community Also: ? functionname (short on-line help) ?\ (keyboard shortcuts) ?. (member functions) Extended help (if available): ?? (opens the full user's manual in a dvi previewer) ?? tutorial / refcard / libpari (tutorial/reference card/libpari manual) ?? refcard-ell (or -lfun/-mf/-nf: specialized reference card) ?? keyword (long help text about "keyword" from the user's manual) ??? keyword (a propos: list of related functions). (09:17) gp > ?10 bnfcertify bnfdecodemodule bnfinit bnfisintnorm bnfisnorm bnfisprincipal bnfissunit bnfisunit bnflog bnflogdegree bnflogef bnfnarrow bnfsignunit bnfsunit bnfunits bnrL1 bnrchar bnrclassfield bnrclassno bnrclassnolist bnrcompositum bnrconductor bnrconductorofchar bnrdisc bnrdisclist bnrgaloisapply bnrgaloismatrix bnrinit bnrisconductor bnrisgalois bnrisprincipal bnrmap bnrrootnumber bnrstark dirzetak factornf galoischardet galoischarpoly galoischartable galoisconjclasses galoisexport galoisfixedfield galoisgetgroup galoisgetname galoisgetpol galoisidentify galoisinit galoisisabelian galoisisnormal galoispermtopol galoissplittinginit galoissubcyclo galoissubfields galoissubgroups gcharalgebraic gcharconductor gcharduallog gchareval gcharidentify gcharinit gcharisalgebraic gcharlocal gcharlog gcharnewprec idealadd idealaddtoone idealappr idealchinese idealcoprime idealdiv idealdown idealfactor idealfactorback idealfrobenius idealhnf idealintersect idealinv idealismaximal idealispower ideallist ideallistarch ideallog idealmin idealmul idealnorm idealnumden idealpow idealprimedec idealprincipalunits idealramgroups idealred idealredmodpower idealstar idealtwoelt idealval matalgtobasis matbasistoalg modreverse newtonpoly nfalgtobasis nfbasis nfbasistoalg nfcertify nfcompositum nfdetint nfdisc nfdiscfactors nfeltadd nfeltdiv nfeltdiveuc nfeltdivmodpr nfeltdivrem nfeltembed nfeltispower nfeltissquare nfeltmod nfeltmul nfeltmulmodpr nfeltnorm nfeltpow nfeltpowmodpr nfeltreduce nfeltreducemodpr nfeltsign nfelttrace nfeltval nffactor nffactorback nffactormod nfgaloisapply nfgaloisconj nfgrunwaldwang nfhilbert nfhnf nfhnfmod nfinit nfisideal nfisincl nfisisom nfislocalpower nfkermodpr nflist nfmodpr nfmodprinit nfmodprlift nfnewprec nfpolsturm nfresolvent nfroots nfrootsof1 nfsnf nfsolvemodpr nfsplitting nfsubfields nfsubfieldscm nfsubfieldsmax polcompositum polgalois polred polredabs polredbest polredord poltschirnhaus rnfalgtobasis rnfbasis rnfbasistoalg rnfcharpoly rnfconductor rnfdedekind rnfdet rnfdisc rnfeltabstorel rnfeltdown rnfeltnorm rnfeltreltoabs rnfelttrace rnfeltup rnfequation rnfhnfbasis rnfidealabstorel rnfidealdown rnfidealfactor rnfidealhnf rnfidealmul rnfidealnormabs rnfidealnormrel rnfidealprimedec rnfidealreltoabs rnfidealtwoelt rnfidealup rnfinit rnfisabelian rnfisfree rnfislocalcyclo rnfisnorm rnfisnorminit rnfkummer rnflllgram rnfnormgroup rnfpolred rnfpolredabs rnfpolredbest rnfpseudobasis rnfsteinitz subcyclohminus subcycloiwasawa subcyclopclgp subgrouplist (09:18) gp > f=x^3+x^2-2*x-1 %1 = x^3 + x^2 - 2*x - 1 (09:18) gp > polroots(f) %2 = [-1.8019377358048382524722046390148901023 + 0.E-38*I, -0.44504186791262880857780512899358951893 + 0.E-38*I, 1.2469796037174670610500097680084796213 + 0.E-38*I]~ (09:18) gp > F=nfinit(f) %3 = [x^3 + x^2 - 2*x - 1, [3, 0], 49, 1, [[1, -1.8019377358048382524722046390148901023, 0.44504186791262880857780512899358951893; 1, -0.44504186791262880857780512899358951893, -1.2469796037174670610500097680084796213; 1, 1.2469796037174670610500097680084796213, 1.8019377358048382524722046390148901023], [1, -1.8019377358048382524722046390148901023, 0.44504186791262880857780512899358951893; 1, -0.44504186791262880857780512899358951893, -1.2469796037174670610500097680084796213; 1, 1.2469796037174670610500097680084796213, 1.8019377358048382524722046390148901023], [16, -29, 7; 16, -7, -20; 16, 20, 29], [3, -1, 1; -1, 5, 2; 1, 2, 5], [7, 0, 5; 0, 7, 2; 0, 0, 1], [3, 1, -1; 1, 2, -1; -1, -1, 2], [7, [-2, 1, 1; 1, -3, 1; 0, 1, -2]], [7]], [-1.8019377358048382524722046390148901023, -0.44504186791262880857780512899358951893, 1.2469796037174670610500097680084796213], [1, x, x^2 + x - 1], [1, 0, 1; 0, 1, -1; 0, 0, 1], [1, 0, 0, 0, 1, 1, 0, 1, 2; 0, 1, 0, 1, -1, 1, 0, 1, 1; 0, 0, 1, 0, 1, 0, 1, 0, 0]] (09:19) gp > F=nfinit(f); (09:19) gp > F.sign %5 = [3, 0] (09:20) gp > F.disc %6 = 49 (09:20) gp > F.zk %7 = [1, x, x^2 + x - 1] (09:20) gp > idealprimedec(F,2) %8 = [[2, [2, 0, 0]~, 1, 3, 1]] (09:22) gp > Pl=idealprimedec(F,2) %9 = [[2, [2, 0, 0]~, 1, 3, 1]] (09:23) gp > #Pl %10 = 1 (09:23) gp > Pl[1].e %11 = 1 (09:24) gp > Pl[1].f %12 = 3 (09:24) gp > Pl=idealprimedec(F,3) %13 = [[3, [3, 0, 0]~, 1, 3, 1]] (09:25) gp > #Pl %14 = 1 (09:25) gp > Pl[1].e %15 = 1 (09:25) gp > Pl[1].f %16 = 3 (09:25) gp > forprime(p=2,23,print(p)) 2 3 5 7 11 13 17 19 23 (09:26) gp > forprime(p=2,23,Pl=idealprimedec(F,p);print(Pl)) [[2, [2, 0, 0]~, 1, 3, 1]] [[3, [3, 0, 0]~, 1, 3, 1]] [[5, [5, 0, 0]~, 1, 3, 1]] [[7, [-2, 1, 0]~, 3, 1, [-2, 3, 4; 2, -3, 3; 1, 2, -2]]] [[11, [11, 0, 0]~, 1, 3, 1]] [[13, [-7, 1, 0]~, 1, 1, [3, -5, -4; -6, 10, -5; 1, -6, 3]], [13, [3, 1, 0]~, 1, 1, [5, -2, -1; -3, 9, -2; 1, -3, 5]], [13, [5, 1, 0]~, 1, 1, [6, -4, -3; -5, 12, -4; 1, -5, 6]]] [[17, [17, 0, 0]~, 1, 3, 1]] [[19, [19, 0, 0]~, 1, 3, 1]] [[23, [23, 0, 0]~, 1, 3, 1]] (09:26) gp > forprime(p=2,23,Pl=idealprimedec(F,p);print(p," ",Pl)) 2 [[2, [2, 0, 0]~, 1, 3, 1]] 3 [[3, [3, 0, 0]~, 1, 3, 1]] 5 [[5, [5, 0, 0]~, 1, 3, 1]] 7 [[7, [-2, 1, 0]~, 3, 1, [-2, 3, 4; 2, -3, 3; 1, 2, -2]]] 11 [[11, [11, 0, 0]~, 1, 3, 1]] 13 [[13, [-7, 1, 0]~, 1, 1, [3, -5, -4; -6, 10, -5; 1, -6, 3]], [13, [3, 1, 0]~, 1, 1, [5, -2, -1; -3, 9, -2; 1, -3, 5]], [13, [5, 1, 0]~, 1, 1, [6, -4, -3; -5, 12, -4; 1, -5, 6]]] 17 [[17, [17, 0, 0]~, 1, 3, 1]] 19 [[19, [19, 0, 0]~, 1, 3, 1]] 23 [[23, [23, 0, 0]~, 1, 3, 1]] (09:27) gp > forprime(p=2,23,Pl=idealprimedec(F,p);g=#Pl;print(p," ",g)) 2 1 3 1 5 1 7 1 11 1 13 3 17 1 19 1 23 1 (09:28) gp > forprime(p=2,50,Pl=idealprimedec(F,p);g=#Pl;print(p," ",g)) 2 1 3 1 5 1 7 1 11 1 13 3 17 1 19 1 23 1 29 3 31 1 37 1 41 3 43 3 47 1 (09:28) gp > forprime(p=2,50,Pl=idealprimedec(F,p);g=#Pl;es=vector(#Pl,i,Pl[i].e);fs=vector(#Pl,i,Pl[i].f);print(p,"\t",g,"\t",fs,"\t",es)) 2 1 [3] [1] 3 1 [3] [1] 5 1 [3] [1] 7 1 [1] [3] 11 1 [3] [1] 13 3 [1, 1, 1] [1, 1, 1] 17 1 [3] [1] 19 1 [3] [1] 23 1 [3] [1] 29 3 [1, 1, 1] [1, 1, 1] 31 1 [3] [1] 37 1 [3] [1] 41 3 [1, 1, 1] [1, 1, 1] 43 3 [1, 1, 1] [1, 1, 1] 47 1 [3] [1] (09:30) gp > forprime(p=2,100,Pl=idealprimedec(F,p);g=#Pl;es=vector(#Pl,i,Pl[i].e);fs=vector(#Pl,i,Pl[i].f);print(p,"\t",g,"\t",fs,"\t",es)) 2 1 [3] [1] 3 1 [3] [1] 5 1 [3] [1] 7 1 [1] [3] 11 1 [3] [1] 13 3 [1, 1, 1] [1, 1, 1] 17 1 [3] [1] 19 1 [3] [1] 23 1 [3] [1] 29 3 [1, 1, 1] [1, 1, 1] 31 1 [3] [1] 37 1 [3] [1] 41 3 [1, 1, 1] [1, 1, 1] 43 3 [1, 1, 1] [1, 1, 1] 47 1 [3] [1] 53 1 [3] [1] 59 1 [3] [1] 61 1 [3] [1] 67 1 [3] [1] 71 3 [1, 1, 1] [1, 1, 1] 73 1 [3] [1] 79 1 [3] [1] 83 3 [1, 1, 1] [1, 1, 1] 89 1 [3] [1] 97 3 [1, 1, 1] [1, 1, 1] (09:32) gp > forprime(p=2,200,Pl=idealprimedec(F,p);g=#Pl;es=vector(#Pl,i,Pl[i].e);fs=vector(#Pl,i,Pl[i].f);print(p,"\t",g,"\t",fs,"\t",es)) 2 1 [3] [1] 3 1 [3] [1] 5 1 [3] [1] 7 1 [1] [3] 11 1 [3] [1] 13 3 [1, 1, 1] [1, 1, 1] 17 1 [3] [1] 19 1 [3] [1] 23 1 [3] [1] 29 3 [1, 1, 1] [1, 1, 1] 31 1 [3] [1] 37 1 [3] [1] 41 3 [1, 1, 1] [1, 1, 1] 43 3 [1, 1, 1] [1, 1, 1] 47 1 [3] [1] 53 1 [3] [1] 59 1 [3] [1] 61 1 [3] [1] 67 1 [3] [1] 71 3 [1, 1, 1] [1, 1, 1] 73 1 [3] [1] 79 1 [3] [1] 83 3 [1, 1, 1] [1, 1, 1] 89 1 [3] [1] 97 3 [1, 1, 1] [1, 1, 1] 101 1 [3] [1] 103 1 [3] [1] 107 1 [3] [1] 109 1 [3] [1] 113 3 [1, 1, 1] [1, 1, 1] 127 3 [1, 1, 1] [1, 1, 1] 131 1 [3] [1] 137 1 [3] [1] 139 3 [1, 1, 1] [1, 1, 1] 149 1 [3] [1] 151 1 [3] [1] 157 1 [3] [1] 163 1 [3] [1] 167 3 [1, 1, 1] [1, 1, 1] 173 1 [3] [1] 179 1 [3] [1] 181 3 [1, 1, 1] [1, 1, 1] 191 1 [3] [1] 193 1 [3] [1] 197 3 [1, 1, 1] [1, 1, 1] 199 1 [3] [1] (09:34) gp > forprime(p=2,200,Pl=idealprimedec(F,p);g=#Pl;es=vector(#Pl,i,Pl[i].e);fs=vector(#Pl,i,Pl[i].f);print(p,"\t",g,"\t",fs)) 2 1 [3] 3 1 [3] 5 1 [3] 7 1 [1] 11 1 [3] 13 3 [1, 1, 1] 17 1 [3] 19 1 [3] 23 1 [3] 29 3 [1, 1, 1] 31 1 [3] 37 1 [3] 41 3 [1, 1, 1] 43 3 [1, 1, 1] 47 1 [3] 53 1 [3] 59 1 [3] 61 1 [3] 67 1 [3] 71 3 [1, 1, 1] 73 1 [3] 79 1 [3] 83 3 [1, 1, 1] 89 1 [3] 97 3 [1, 1, 1] 101 1 [3] 103 1 [3] 107 1 [3] 109 1 [3] 113 3 [1, 1, 1] 127 3 [1, 1, 1] 131 1 [3] 137 1 [3] 139 3 [1, 1, 1] 149 1 [3] 151 1 [3] 157 1 [3] 163 1 [3] 167 3 [1, 1, 1] 173 1 [3] 179 1 [3] 181 3 [1, 1, 1] 191 1 [3] 193 1 [3] 197 3 [1, 1, 1] 199 1 [3] (09:35) gp > f=x^3+x^2-1; (09:38) gp > polroots(f) %27 = [0.75487766624669276004950889635852869189 + 0.E-38*I, -0.87743883312334638002475444817926434595 - 0.74486176661974423659317042860439236724*I, -0.87743883312334638002475444817926434595 + 0.74486176661974423659317042860439236724*I]~ (09:38) gp > F=nfinit(f); (09:39) gp > F.disc %29 = -23 (09:39) gp > forprime(p=2,100,Pl=idealprimedec(F,p);g=#Pl;es=vector(#Pl,i,Pl[i].e);fs=vector(#Pl,i,Pl[i].f);print(p,"\t",g,"\t",fs,"\t",es)) 2 1 [3] [1] 3 1 [3] [1] 5 2 [1, 2] [1, 1] 7 2 [1, 2] [1, 1] 11 2 [1, 2] [1, 1] 13 1 [3] [1] 17 2 [1, 2] [1, 1] 19 2 [1, 2] [1, 1] 23 2 [1, 1] [1, 2] 29 1 [3] [1] 31 1 [3] [1] 37 2 [1, 2] [1, 1] 41 1 [3] [1] 43 2 [1, 2] [1, 1] 47 1 [3] [1] 53 2 [1, 2] [1, 1] 59 3 [1, 1, 1] [1, 1, 1] 61 2 [1, 2] [1, 1] 67 2 [1, 2] [1, 1] 71 1 [3] [1] 73 1 [3] [1] 79 2 [1, 2] [1, 1] 83 2 [1, 2] [1, 1] 89 2 [1, 2] [1, 1] 97 2 [1, 2] [1, 1] (09:39) gp > forprime(p=2,200,Pl=idealprimedec(F,p);g=#Pl;es=vector(#Pl,i,Pl[i].e);fs=vector(#Pl,i,Pl[i].f);print(p,"\t",g,"\t",fs,"\t",es)) 2 1 [3] [1] 3 1 [3] [1] 5 2 [1, 2] [1, 1] 7 2 [1, 2] [1, 1] 11 2 [1, 2] [1, 1] 13 1 [3] [1] 17 2 [1, 2] [1, 1] 19 2 [1, 2] [1, 1] 23 2 [1, 1] [1, 2] 29 1 [3] [1] 31 1 [3] [1] 37 2 [1, 2] [1, 1] 41 1 [3] [1] 43 2 [1, 2] [1, 1] 47 1 [3] [1] 53 2 [1, 2] [1, 1] 59 3 [1, 1, 1] [1, 1, 1] 61 2 [1, 2] [1, 1] 67 2 [1, 2] [1, 1] 71 1 [3] [1] 73 1 [3] [1] 79 2 [1, 2] [1, 1] 83 2 [1, 2] [1, 1] 89 2 [1, 2] [1, 1] 97 2 [1, 2] [1, 1] 101 3 [1, 1, 1] [1, 1, 1] 103 2 [1, 2] [1, 1] 107 2 [1, 2] [1, 1] 109 2 [1, 2] [1, 1] 113 2 [1, 2] [1, 1] 127 1 [3] [1] 131 1 [3] [1] 137 2 [1, 2] [1, 1] 139 1 [3] [1] 149 2 [1, 2] [1, 1] 151 1 [3] [1] 157 2 [1, 2] [1, 1] 163 1 [3] [1] 167 3 [1, 1, 1] [1, 1, 1] 173 3 [1, 1, 1] [1, 1, 1] 179 1 [3] [1] 181 2 [1, 2] [1, 1] 191 2 [1, 2] [1, 1] 193 1 [3] [1] 197 1 [3] [1] 199 2 [1, 2] [1, 1] (09:40) gp > forprime(p=2,200,Pl=idealprimedec(F,p);g=#Pl;es=vector(#Pl,i,Pl[i].e);fs=vector(#Pl,i,Pl[i].f);print(p,"\t",g,"\t",fs)) 2 1 [3] 3 1 [3] 5 2 [1, 2] 7 2 [1, 2] 11 2 [1, 2] 13 1 [3] 17 2 [1, 2] 19 2 [1, 2] 23 2 [1, 1] 29 1 [3] 31 1 [3] 37 2 [1, 2] 41 1 [3] 43 2 [1, 2] 47 1 [3] 53 2 [1, 2] 59 3 [1, 1, 1] 61 2 [1, 2] 67 2 [1, 2] 71 1 [3] 73 1 [3] 79 2 [1, 2] 83 2 [1, 2] 89 2 [1, 2] 97 2 [1, 2] 101 3 [1, 1, 1] 103 2 [1, 2] 107 2 [1, 2] 109 2 [1, 2] 113 2 [1, 2] 127 1 [3] 131 1 [3] 137 2 [1, 2] 139 1 [3] 149 2 [1, 2] 151 1 [3] 157 2 [1, 2] 163 1 [3] 167 3 [1, 1, 1] 173 3 [1, 1, 1] 179 1 [3] 181 2 [1, 2] 191 2 [1, 2] 193 1 [3] 197 1 [3] 199 2 [1, 2]