John Cremona on Thu, 20 Sep 2012 12:28:36 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: forprime |
Maybe this is an example: when summing L-series (and related series) where the coefficients a(n) are multiplicative, one needs the factorization of n in order to compute the coefficient a(n). I have old GP code which does this in order to cpmpute analytic ranks and Heegner points on elliptic curves. This goes back to the days where GP did not allow any arrays to have more then (?) 46000 entries, and memory was limited, so the whole scheme may be completely redundant now that ellan(e,10^6) takes <5s. John On 20 September 2012 10:51, Karim Belabas <Karim.Belabas@math.u-bordeaux1.fr> wrote: > * Charles Greathouse [2012-09-18 21:23]: >> > As for me not looping over all composits, but looping over integers >> > with a given number of divisors will be of great interest. > [...] >> But it's hard to think of examples off the top of my head. Very often >> it just comes up in the middle of a problem where I find the need and >> I just code something. > > To my surprise, I'm using it quite a lot today, when using GP as a > simple calculator to quickly tune isprimepower(). It's actually > quite convenient :-) > > forfactored() is also interesting [ since one can quickly emulate > forsquarefree(), fordisc(), etc. from this one ]. > > Do you already have code for it ? > > Thanks for suggesting this, > > K.B. > -- > Karim Belabas, IMB (UMR 5251) Tel: (+33) (0)5 40 00 26 17 > Universite Bordeaux 1 Fax: (+33) (0)5 40 00 69 50 > 351, cours de la Liberation http://www.math.u-bordeaux1.fr/~belabas/ > F-33405 Talence (France) http://pari.math.u-bordeaux1.fr/ [PARI/GP] > ` >