Bill Allombert on Mon, 25 Sep 2023 10:09:04 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: primorial operator '#' for GP?
|
- To: pari-dev@pari.math.u-bordeaux.fr
- Subject: Re: primorial operator '#' for GP?
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Mon, 25 Sep 2023 10:09:00 +0200
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1695629332; c=relaxed/relaxed; bh=55Dg64EsIxgaCyHzi/IZgrl0g1pKr5Zl3JeL4QQfgks=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:Mail-Followup-To: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; b=oVISeUCy97mh6MkrtvH58AeaL9PeMbJxFpgN7Z06urfBl4jIlMW7UAkwYyrSmUJdcCEmw9/IQ4WmPk+fxK78pd59SFR/ynWJOYDTNKfxvT9riA6Dx+kCj1Cx0H68dRs3GerMBWOxxTBNKHZGSHekrSbIPtuI9bMcMT29sSGPz+koezsCVAPBQS++E/ZQc6T2hLMIbKIaN2k/8Soo9/l6t85jZ4Vbo3/KP/zAAN7lVTtjqdcfErrUQxsPo6KVH8iBWoae0YhWTlkxjRMU+raqaDBpm7BjeovXWq9s4FKo5NMjBNmHFl7unyls8wE5stiyyfuqG8odX4fNiM543Wep0UKm7JsybFMRqmfEwALbv5sZTrcEg5Kq7klxpQmqbbDddEqLmaOWct8S/ET3iLhdgqS5eUMme4301EIBI+MNEN750wRhZGr6pyW+pybEITQhrpKMSYX1JvM0/FmJvGYIbB3PrFp3Ia6SFL5qyMYY2cnOQKr4TsDzCdz7GSVdzUpUFki9LoyoZnLAb53DHvYJ1MkTDYIPxacmx5qjvThPZJZy+fIf+CggLA+OqZ1deQ+1L8Yc6YjzmIywEKRZnjQsuHx1jHe6lUGk2/ROdkqUJZutJGvheRvsLymUvS42ymzSlr3YVCI4m/ZX4J+TDNMDb1urd9IOI9xY6Qbz2OSXtv8=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1695629332; cv=none; b=l1BsuR/mU4I/E9PuRGk7rYWQ6e9ngC31XF0HsT47YuVPFE9YOc8L9/ECwq2lER1mFZi+ipiS2KoZxskloN+AukvvT36Ancs/7hvqxLFTdE3DkXtfu09YprOz0v4TPNJYLOVJQuEc9g5y2KEcDIuZ5umzTRum7shB8/5o+izzDsYqLFp7O+FSu23gV+PhOyoT7wHir3SppE/8ftJ6Qzf0O3a/srtVJzE3SRQR0P/COqM+Jj3YDBoA3qsFhXKJI6JXVTTzZW0m4BaKKTTLXsS7HSMLRZpKh2m/vUZ2C2pXK+gIJYyyh+RsrPZvq+lC3mgRcu0GiAdu5k27Ciw/O1GHWjznFItyXGmZ0uPLfG0PmgXOc77tNovLvaqAqg0onSbiBpHeq4eouwqhJPxa2D4JnZMoUr1sO20PDi2qo8BYSZU9dU5hOoc30gC+CrqI5iD8z/JPF4oVK9gJDDTHB7KK99puFZA84GFglSshCGtlUbowSaDEqhFDZDVOu7dEceVrxUgmlv0eduNHLXg7oCyMk3B6u8rO5Bhxm4GwrJFyyH/qDeM/lx8yi+BiZHEmNdcGLms3heukse8XlnHneOZYERYOTWZChYuch4urbhVdwxHr5FMk245gDTzlKX9KEzZDmKqbgKvzeSR7mrj8ICGzFqsXUPgbz7sMVAvR80hbT/g=
- Authentication-results: smail; arc=none
- Delivery-date: Mon, 25 Sep 2023 10:09:04 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1695629332; bh=55Dg64EsIxgaCyHzi/IZgrl0g1pKr5Zl3JeL4QQfgks=; h=Date:From:To:Subject:References:In-Reply-To:From; b=B27uGrAebyJK0OZM9bLwnEeOdZXv8SBpJ3SUkmAMBZj55HYrj3jzaIVZz4EhGG7mu Xnc9GniqDSGbVtqr/OAL3JTWlhc/uYO2kyzoopqvz4WLr+UVm17nhgjAh60P2k1ckY WaqAdo41jj7DpUPKNtZfMYbyI5w7T86Uy+7cIYSD8+PRwZCJgNEzeQO4QphJ0Wg3e/ xwHD4rmGr87g6Yd3gK0LB3Sy7VkfSqzIA1MMydUzzrzlp+uUWlj0/QdVzZ4PQetyC2 ZgNGDkbWEzeWj+y/FqQHe/9OLD9Pt9VK7NVh9mFK2OxbYXJExLY+4NgmNB22SpDE1m bVLIPKNyoX74KkY2C8DmkBC2PMKpfTe3d6+wJqwrN22lEsZhV1QiVb6Dy+OQJ0PqOz QoRvqNVQhIateo+bhtf1WemS5F7hMlFKil0ybM3qHakSkHBwYD8fuzITDMn7f9v5Mw Tw2tIsOKhMwv0Ika3rbKoSByQ7qkPvmR9QZR3opMhl6PUqudgiwbUYelaHPJDZZljj iXPXpjNqbuEWIjoO/v2dzmvjFPvw1knBK8ALMrqgJS6B2AYB78NbfEUYFfSCoHNAvU YjlxnV8RQoRdBdn4HKJJjcg0HvmVyLY2xzLR6TddrBfcC+6jqJ7huKN1QDAwmBq6BF pnGqcDWN8/tgtP4yD4PMpYyc=
- In-reply-to: <51fc8aff2a2c547688d3a9323fec60e4@stamm-wilbrandt.de>
- Mail-followup-to: pari-dev@pari.math.u-bordeaux.fr
- References: <51fc8aff2a2c547688d3a9323fec60e4@stamm-wilbrandt.de>
On Mon, Sep 25, 2023 at 06:22:02AM +0200, hermann@stamm-wilbrandt.de wrote:
> GP has factorial operator:
> ? 11!
> %6 = 39916800
> ?
>
> Similarly primorial is product of first n primes.
>
> prodeuler produces only a floating point approximation:
> ? prodeuler(p=2,11,p)
> %7 = 2310.0000000000000000000000000000000000
> ?
Better do
? vecprod(primes([1,11]))
%1 = 2310
> Something like this is exact:
> ? P(x)={r=1;forprime(p=2,x,r*=p);r}
> %8 = (x)->r=1;forprime(p=2,x,r*=p);r
> ? P(11)
> %9 = 2310
> ?
>
> Any chance to see "#" as operator in GP like "!"?
> ? 11#
> *** syntax error, unexpected '#', expecting end of file: 11#
> *** ^-
I suppose we could add a primorial() function but adding a new operator would
be a bit too much.
Cheers,
Bill.