Menu

#2975 number of distinct partitions gives wroing result

None
closed
nobody
5
2015-08-11
2015-06-12
dan hayes
No

wxMaxima version: 13.4.0
Maxima version: 5.31.1
Maxima build date: 2013-09-24 09:49:12
Host type: i686-pc-mingw32
Lisp implementation type: GNU Common Lisp (GCL)
Lisp implementation version: GCL 2.6.8

The help file states:
"num_distinct_partitions(n, list) returns a list of the number of distinct partitions of 1, 2, 3, ..., n. "
But for any positive integer the output is INCORRECT in that it gives an extra 1 in the beginning of the list as if the above were written:
"...0,1, 2, 3, ..., n. " Please correct either the function or the help file wording. For example

num_distinct_partitions(1, list)

gives [1,1] while according the help file it should only be [1]

Discussion

  • Robert Dodier

    Robert Dodier - 2015-08-11
    • labels: --> num_partitions, num_distinct_partitions
    • status: open --> closed
     
  • Robert Dodier

    Robert Dodier - 2015-08-11

    Changed the code so that the functions match the description. Fixed by commit b6d450b. Closing this report as fixed.

     

Log in to post a comment.

MongoDB Logo MongoDB