Benyamin Gholami on Tue, 17 Jan 2017 17:50:43 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: your mail |
* Benyamin Gholami [2017-01-17 15:18]:
> hi
> i want to calculate mestre sum S(E,N) for elliptic curves:
> \sum ((-a_p)+2)/(p+1-(a_p))
> but i don't know its code in pari or sage .
> how can i do this?
I'm not sure what S(E,N) is; here's a guess:
S(E, N) =
{ my (s = 0.0);
forprime(p = 2, N, my(a = ellap(E,p)); s += (2-a)/(p+1-a));
return (s);
}
(17:37) gp > E = ellinit([0,0,0,1,1]); \\ y^2 = x^3 + x + 1
(17:37) gp > S(E, 10^6)
time = 2,188 ms.
%2 = 4.814774624816872161354657131317 3856035
Cheers,
K.B.
--
Karim Belabas, IMB (UMR 5251) Tel: (+33) (0)5 40 00 26 17
Universite de Bordeaux Fax: (+33) (0)5 40 00 21 23
351, cours de la Liberation http://www.math.u-bordeaux.fr/~kbelabas/ Talence (France) http://pari.math.u-bordeaux.
F-33405fr/ [PARI/GP]
`