| Ruud H.G. van Tol on Fri, 17 Apr 2026 08:55:35 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| numbpart(n, {a = k}) |
For https://oeis.org/A046682, I created this code:
first(nn) = {
my( v = Vec( 1 / prod( k=1, nn, 1+(-x)^k, 1+x*O(x^nn) ) ) );
vector( nn, i, ( numbpart(i-1) + v[i] ) / 2 );
}
This takes about a minute to return 10k values.
Is there a faster way to initialize v?
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}).
-- Greetings, Ruud