(49g 50g) Partition Numbers, Q Partition numbers
|
07-20-2023, 11:59 AM
Post: #3
|
|||
|
|||
RE: (49g 50g) Partition Numbers, Q Partition numbers
The next program returns rows 1 through n of A008289, the Q partition triangle, Q(n,m) = number of partitions of n into m distinct parts, n>=1, m>=1. Computation starts with row 6 to avoid time-consuming tests inside the loop.
First, the HP 49/50 version using exact integers. Code:
Next, an HP-28 compatible version. For the HP-48, LIST\-> DROP can be replaced with EVAL. Code:
Additional note: The sum of the terms of each row is A000009(n) which is the sequence computed by the third program in post #1. On the HP 49 and 50 with ListExt, this program can be followed by :: LSUM LMAP to return a list of A000009 from 1..n. This is actually a bit faster than the above program, which should now be considered semi-obsolete on the HP 49 and 50. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(49g 50g) Partition Numbers, Q Partition numbers - John Keith - 09-25-2018, 08:36 PM
RE: (49g 50g) Partition Numbers, Q Partition numbers - John Keith - 08-27-2019, 01:02 PM
RE: (49g 50g) Partition Numbers, Q Partition numbers - John Keith - 07-20-2023 11:59 AM
|
User(s) browsing this thread: 1 Guest(s)