| Karim BELABAS on Mon, 20 May 2002 18:35:36 +0200 (MEST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: rad function |
On Mon, 20 May 2002, Jon Perry wrote:
> Is there a rad function in Pari/GP?
>
> rad(n) is the square-free component of n, e.g. rad(12)=rad(2.2.3)=6
No. You can use
rad(n) =
{ local(p,i);
p = factor(n)[,1];
prod(i=1, length(p), p[i])
}
Cheers,
Karim.
--
Karim Belabas Tel: (+33) (0)1 69 15 57 48
Dép. de Mathematiques, Bat. 425 Fax: (+33) (0)1 69 15 60 19
Université Paris-Sud Email: Karim.Belabas@math.u-psud.fr
F-91405 Orsay (France) http://www.math.u-psud.fr/~belabas
--
PARI/GP Home Page: http://www.parigp-home.de/