2022-08-12, 07:51 | #1 |
Aug 2022
1 Posts |
summation in pari gp
Is there any command to evaluate in PARI GP such sum: \(\sum\limits_{\substack{2\leq d\leq n \\ (d, n)=1}}\frac{a\left(n\right)}{d}\)?
In other words: how to add to command sum(d=2, n, \frac{a(n)}{d}) condition from second line $(d,n)=1$) (or more such conditions) Last fiddled with by LaurV on 2022-08-12 at 09:40 Reason: fixed the formula |
2022-08-12, 09:48 | #2 |
Romulan Interpreter
"name field"
Jun 2011
Thailand
2×5×1,013 Posts |
you mean this?
Code:
gp > sum(d=1,20,if(d%2==0&&d%3==0,1./d,0),0) %1 = 0.30555555555555555555555555555555555556 gp > 1./6+1/12+1/18 %2 = 0.30555555555555555555555555555555555556 gp > (p.s. I also edited your post and fixed your formula) |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Need help pari gp | User133 | PARI/GP | 46 | 2020-06-15 11:29 |
LLL in GP/Pari | paul0 | Programming | 2 | 2015-11-17 13:04 |
PARI vs GAP | skan | Miscellaneous Math | 0 | 2012-12-16 00:13 |
pari | devarajkandadai | Programming | 21 | 2012-08-31 18:08 |
Σ summation increments | roger | Math | 2 | 2008-04-18 07:04 |