Re: numbpart(n, {a = k})

"Ruud H.G. van Tol" <[email protected]> Fri, 17 Apr 2026 16:50:05 +0200
Newsgroups gmane.comp.mathematics.pari.user
Message-ID <[email protected]>
On 2026-04-17 12:03, Bill Allombert wrote:
> On Fri, Apr 17, 2026 at 08:55:23AM +0200, Ruud H.G. van Tol wrote:
>> Would a variant numbpart(n, {a = k}) be interesting, like Maple has?
>> With the optional a-parameter like with partitions(k, {a = k}, {n = k}).
> numbpart use Rademacher formula, which is much faster than #partitions(n) but is
> only valid for partitions(n,,).
> I do not know fast formula for the other cases.
>
> For example pari can compute numbpart(1000000) in 5 ms

I presumed that it would become an additional GEN numbpart_GG(GEN n, GEN a).


> How far Maple can go?

Wouldn't know, never used Maple yet. Only found it in its documentation 
when I was porting Maple code to GP.

https://en.wikipedia.org/wiki/Partition_function_(number_theory)
made me expect that the symmetry would facilitate calculating p42(n).

The Minimal Excludant in Integer Partitions
https://cs.uwaterloo.ca/journals/JIS/VOL23/Andrews/andrews5.pdf

-- Ruud