Here is some update. Looks like it is a problem in passing pari_precode value into GP interpreter. The random input (like a syntax error) gives the same error message. I avoided using two functions replacing tau by a table, now the code works in SAGE. It is not clear though in advance how many coefficients I have to compute, so it is not quite convenient. Also the other example does not work yet, while it does the job in PARI/GP.
sage: pari_precode = 'a(n)= tau=[1, -24, 252, -1472, 4830, -6048, -16744, 84480, -113643, -115920, 534612, -370944, -577738, 401856, 1217160, 987136, -6905934, 2727432, 10661420, -7109760, -4219488, -12830688, 18643272, 21288960, -25499225, 13865712, -73279080, 24647168, 128406630, -29211840, -52843168, -196706304, 134722224, 165742416, -80873520, 167282496, -182213314, -255874080, -145589976, 408038400, 308120442, 101267712, -17125708,-786948864, -548895690, -447438528, 2687348496, 248758272, -1696965207,611981400, -1740295368];return(sum(d=1,n,if((floor(n*1.0/d)*d)==n,d*tau[d]*tau[n/ d])));' sage: L2 = Dokchitser(conductor=1, gammaV=[-1,0,0,1], weight=13, eps=1) sage: print "\nComputing L2 with Dokchitser; need",L2.num_coeffs(),"coefficients" sage: L2.init_coeffs('a(k)', pari_precode=pari_precode) sage: print "L(s-1,Delta)*L(s,Delta) :\n\t",L2(s) Computing L2 with Dokchitser; need 47 coefficients L(s-1,Delta)*L(s,Delta) : 0.942700249255570 sage: L = Dokchitser(conductor=1, gammaV=[-11,-10,0,1], weight=31, eps=1, prec=5) sage: print "\n", L sage: print "Need", L.num_coeffs(), "coefficients" sage: pari_precode = 'a(n)= b = [1, 456, 50652, -316352, -2377410, 23097312, -16917544, -383331840, 1403363637, -1084098960, -16212108, -16023861504, 50421615062, -7714400064, -120420571320, -8939761664, 225070099506, 639933818472, -1710278572660, 752098408320, -856907438688, -7392721248, 14036534788872, -19416524359680, -13421408020025, 22992256468272, 12212307114840, 5351898879488, 1137835269510, -54911780521920, -104626880141728, 196899752411136, -821175694416, 102631965374736, 40219938281040, -443956893292224, -169392327370594, -779887029132960, 2553955646120424, 911336949734400, -3309984750560838, -390749792041728, 1127913532193492, 5128732790016, -3336370744240170, 6400659863725632, 3498693987674256, -452816807804928, -11112691890381207, -6120162057131400, 11400250680177912, -15950978768093824, 29956294112980302, 5568812044367040, 38542827680280, 6485033269800960, -86629030262374320, 518852882896560, 58391397642732420, 38095288578224640, 23373685132672742, -47709857344627968, -23741466076947528, 94473296862773248, -119872851864549420, -374456116653696, -205102524257382244, -71201376118922112, 710978560125944544, 18340291856154240, -177902341950417768, -537953965160302080, 299853775038660122, -77242901280990864, -679821159030306300, 541050047018136320, 274269050422752, 1164603774630913344, -92227090144007440, 21253478777610240, -1012497699493199799, -1509353046255742128, 1208542823470585932, 271084382043826176, -535083905266559460, 514328570680232352, 57633632071220520, 6214617189918720, 4371201192290304330, -1521385059373517520, -853009891362447728, -4440485853529234944, -5299560732938806656, 1595404458379460736, 4066033381427610600, 9973366259128860672, -635013222218448094, -5067387502013830392, -22751482846316796, 4245889269950948800, -14225184990751604898, 5198514310161127872, 4907294374153596152, -19328210477488174080, 2037220313811238080, 13660070115519017712, 26462522729977956756, -3863387780393863680, -18417779076742725130, 17575529422207680, -8580060165975327288, 151238811300233216, 25742101939950990162, -39502837799642689920, -33370598172412181520, -359956463180027520, 70759861096822300494, 26626477325085983520, -3807633311477133264, 46161039177946828800, -61158827615968742627, 10658400420498770352, -167657347585407566376, 33098922786595936256, 77253686772235291500, -10826108531088072768, 88072027398734416256, -60152354022705070080, 57131076232664756784, -54662020450234535520, 71928888557627226972, 259780573279890432, 28933713005232747040, -93526751061366303264, -29033661057891764400, -86276535372618071040, -295426173292082995494, 324206223417430712064, 138478242598622657780, -12723657915083566080, 177215847863676414912, -81123467929390502208, -817440668919570696, -12545736442704211968, -2705100948085769100, 136733321417629015632, -562880069631588896964, 53587601548342153088, -266021193813555196050, -309998448517819672800, 575578481645706044552, 655604232170331494400, 315855193422692063322, 125066686992774912, 248740991117745564480, -807948976561488373248, -1072375480931336531194, -42055553105667392640, 1517346209410678256904, -468111440379758837760, -237463694898272770368, -461698950968899108344, -580764662999007691588, 1047120295809422222976, 1952271307661542560, 551095527502587184992, 243392417169880585656, 328479905181958225920, 1080418975085059153167, -243998260801551113760, -2400142758011306364420, -356817701736475581184, -1193502882659918351178, 26280936224476557120, 227057260720725818600, 144932381591027712, 2957641073399682537840, 1993267743684378774480, -4146639259449756929940, 1055467557681866259840, 3323637583685998127822, -388972510461276163968, 1183923899340139727784, -5380650707842315284480, 402715013014123881540, -2416599694220095835136, -3648860760762018648, -1106818840388726234112, -206602242956818752960, 1854111221930990433600, 6193795096341916302912, 4785261432693190557696, -5206971294736770240958, -289566029331612330864, -6071799692643157221840, 3515522304905875596864, 2423836313237712027006, -10374676177920458976, -1059072621521283111400, 5144853031706940096000]; t = 0; for(d=1,n^(1/2)+1, i = floor(n/(d^2)); if(i==(n+0.0)/(d^2), t = t + d^30*tau(i)*b[i];);); return(t);' sage: L.init_coeffs('a(k)', pari_precode=pari_precode) sage: print "L(12,Delta \otimes g_20) :\n\t",L(12) Dokchitser L-series of conductor 1 and weight 31 Need 22 coefficients Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/kvankov/.sage/sage_notebook/worksheets/admin/19/code/ 1.py", line 16, in <module> L.init_coeffs('a(k)', pari_precode=pari_precode) File "/usr/local/sage-2.11-ubuntu32-intel-i686-Linux/local/lib/ python2.5/site-packages/sage/lfunctions/dokchitser.py", line 286, in init_coeffs self._gp_eval('initLdata("%s", %s)'%(v, cutoff)) File "/usr/local/sage-2.11-ubuntu32-intel-i686-Linux/local/lib/ python2.5/site-packages/sage/lfunctions/dokchitser.py", line 220, in _gp_eval raise RuntimeError, "Unable to create L-series, due to precision or other limits in PARI." RuntimeError: Unable to create L-series, due to precision or other limits in PARI. I'll keep looking into this issue. Kirill --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---