/* in order to use this L function package $cd pari$ git fetch origin/pascal-lfundemo $git checkout -b lfun origin/pascal-lfundemo$ ./Configure -l $make -j gp$ ./gp */ /* examples of L functions */ /* number fields and Artin representations. */ /* zeta(s) */ Lzeta=[n->1,0,[0],0,1,1,0]; /* zeta_{Q(\sqrt{5})}(s) */ LQ5=[n->sumdiv(n,d,kronecker(5,d)),0,[0,0],0,5,1,0]; /* totally real cubic field */ maxn=500000; nf148=dirzetak(nfinit(x^3+x^2-3*x-1),maxn); LQd3=[n->nf148[n],0,[0,0,0],0,148,1,0]; /* [0,0,0] */ /* its L function can be divided by zeta */ vzeta=vector(maxn,n,1); nf148z=dirdiv(nf148,vzeta); LQd3z=[n->nf148z[n],0,[0,0],0,148,1]; /* [0,0,0]-[0] */ /* quintic */ nf24217=dirzetak(nfinit(x^5-5*x^3-x^2+3*x+1),maxn); LQd5=[n->nf24217[n],0,[0,0,0,0,0],0,24217,1,0]; /* [0,0,0,0,0] */ nf24217z=dirdiv(nf24217,vzeta); LQd5z=[n->nf24217z[n],0,[0,0,0,0],0,24217,1]; /* [0,0,0,0,0]-[0] */ /* elliptic curves */ e11=ellinit("11a1"); Le11=[n->ellak(e11,n),0,[0,1],1,11,1]; e37=ellinit("37a1"); Le37=[n->ellak(e37,n),0,[0,1],1,37,-1]; e5077=ellinit("5077a1"); Le5077=[n->ellak(e5077,n),0,[0,1],1,5077,-1]; /* modular forms */ /* weight 1 */ mf23='x*eta('x+O('x^10000))*eta('x^23+O('x^10000)); Lmf23=[n->polcoeff(mf23,n),0,[0,1],0,23,1]; /* Ramanujan Delta, weight 11 */ mftau='x*eta('x+O('x^10000))^24; Ltau=[n->polcoeff(mftau,n),0,[0,1],11,1,1]; /* sp = 1 */ /* weight 25 */ mysigma(n,k)=if(n>0,sigma(n,k),zeta(-k)/2); Lw26=[n->sum(m=1,n,polcoeff(mftau,m)*mysigma(n-m,13)),0,[0,1],25,1,-1]; /* automorphic form */ an61={[1,-7,-3,25,3,21,-9,-63,6,-21,-4,-75,-3,63,-9,169,37,-42,-75,75,27,28,10,189,-76,21,-90,-225,212,63,-6,-623,12,-259,-27,150,-88,525,9,-189,-3,-189,547,-100,18,-70,-147,-507,25,532,-111,-75,-108,630,-12,567,225,-1484,-45,-225,145,42,-54,2233,-9,-84,-632,925,-30,189,-650,-378,859,616,228,-1875,36,-63,-978,507,-234,21,931,675,111,-3829,-636,252,-571,-126,27,250,18,1029,-225,1869,453,-175,-24,-1900,830,777,1246,189,81,756,707,-2250,-378,84,264,-1521,-225,-1575,30,5300,-18,315,-333,567,-1722,-1015,9,-150,-108,378,1607,-6111,-1641,63,-1399,300,675,4424,-270,-2331,-861,210,1938,-675,441,4550,12,1014,636,-6013,-75,-2200,157,-1596,2356,4725,222,-252,-18,225,-414,6846,324,-1869,-90,1638,-11,-75,36,-6517,-1852,-1701,-1460,-777,-450,13675,-2021,4452,684,-676,135,3997,1444,450,442,-189,-435,-630,-264,-126,-148,-3675,810,1575,-366,-6699,-2790,-3171,27,625,-815,168,-2753,4788,1896,-5810,-1908,-2775,-9,-8722,60,-507,300,-567,-3519,-2700,1950,-4949,1641,5670,54,2646,-2577,-300,-111,-1848,1 00,5607,-456,1575,-2302,5625,-813,-210,-108,-13356,-1136,126,-441,-1125,2934,2331,5251,-1521,5366,12054,2673,3625,75,-63,225,378,-2793,756,4478,-1350,-40,-11249,-333,13257,-1794,11487,792,-225,1272,9793,4270,-756,-324,-4725,1713,-15800,7959,1890,-2409,6253,-81,6027,304,-750,1592,-13566,-36,1701,7566,-3087,-737,-16250,675,-84,27,-3738,-6553,-4452,-1359,21475,-6777,525,-135,5544,360,-1099,-30,5700,-4923,-16492,-2490,-12675,435,-1554,1350,900,-3738,126,4001,-567,2685,2898,-162,-24450,7560,-2268,-848,6699,-2121,630,-2775,-5850,228,77,1134,189,1323,-252,-6732,23275,-528,12964,-1896,4563,-5228,10220,675,2775,24,3150,-2808,-34461,-90,14147,2829,-15900,4999,-4788,270,2492,-18397,-945,-1950,-14275,999,-10108,3871,-1134,-1861,-3094,5166,675,2577,3045,3171,1690,-18,1848,972,450,-6977,1036,324,9261,-636,-5670,8517,-5625,-4821,2562,5665,18333,108,19530,3282,11325,-194,-189,370,-1575,4197,5705,-2934,-600,-1484,19271,-2025,-12844,-2484,-13272,18,20750,-702,13356,352,6993,-12944,63,2583,311 50,405,-420,2793,1869,-5814,-2100,-1919,2025,21564,24633,-882,6804,-2812,-13650,-1305,17675,-36,-11487,-1559,-15210,-4556,-378,-1908,-9450,-750,18039,-4476,756,150,777,7725,6600,-1713,-700,-471,-20097,-8444,3192,12,-5625,-7068,16114,81,-14175,-2673,5691,-3330,750,-5217,756,-2666,35828,54,7952,-672,-450,5688,3087,1242,2835,-2188,-20538,5700,-8325,-648,-36757,-1129,5607,264,-37562,270,-43050,1359,-18711,467,-9135,33,-525,-4973,225,7844,-1575,-72,-1014,5850,19551,-3859,-2700,5556,-31346,4091,3402,2490,280,4380,40175,10085,2331,-7731,-31311,6750,12558,3738,-41025,588,-5544,6063,567,-2290,-8904,11663,-34975,-2052,-29890,-222,2028,-13838,2268,-270,16875,9,-11991,2121,39816,-4332,-55713,-100,-6750,16984,16863,-1326,-23051,-1134,567,-6079,-21525,870,-2128,-15900,1890,8802,-11144,792,48450,-28136,252,-1641,-4563,444,-52962,591,11025,-675,5159,2106,40950,-13725,-4725,16866,300,1098,-189,-760,13398,21984,45871,8370,15900,-8379,9513,432,-54117,-54,47439,3770,-1875,450,945,2445,-14872,16 344,-2520,-999,3925,8259,210];} L61=[an61,0,[-1,0,0,1],3,61,1]; /* number field to get degree 3 */ nf117=dirzetak(nfinit(x^4-x^3-x^2+x+1),maxn); nf117z=dirdiv(nf117,vzeta); LQ4=[n->nf117z[n],0,[0,1,1],0,117,1]; /* [0,0,1,1]-[0] */