(33S) Partitions & Discrete Partitions
10-04-2016, 06:11 PM (This post was last modified: 06-15-2017 01:25 PM by Gene.)
Post: #1
 Gerald H Senior Member Posts: 1,441 Joined: May 2014
(33S) Partitions & Discrete Partitions
For positive integer input N programme P returns the number of partitions of N, programme Q returns the number of partitions in discrete parts (same as in purely odd parts).

For info on partitions see

https://en.wikipedia.org/wiki/Partition_(number_theory)

Improvements to programme most welcome.

Code:
 1     LBL P 2     CF 0 3     GTO R 1    LBL Q 2     SF 0 1    LBL R 2     RAD 3     STO A 4    24 5     1/x 6     FS? 0 7     +/- 8     +/- 9     + 10     STO G 11     FS? 0 12     GTO S 13     √x 14     1.5 15     1/x 16    √x 17     STO I 18     * 19    π 20     * 21     STO H 1    LBL S 2     CLx 3     STO B 4    1 5     STO C 6     FIX 0 1    LBL O 2     RCL C 3     STO D 4     CLx 5     STO E 1    LBL X 2     RCL C 3     RCL D 1    LBL T 2     RMDR 3     LASTx 4     x<>y 5     x≠0? 6     GTO T 7    1 8     + 9     x≠y? 10     GTO U 11     RCL C 12     x<>y 13     - 14     x=0? 15     GTO V 16     STO F 17     0.5 18     STO J 19    0 1    LBL W 2     RCL D 3     RCL* F 4     RCL/ C 5     FP 6     RCL- J 7     RCL F 8     RCL/ C 9     RCL- J 10     * 11     + 12     DSE F 13     GTO W 1    LBL V 2    4 3     1/x 4     + 5     2*A 6     RCL* D 7     RCL/ C 8     - 9    π 10     * 11     COS 12     STO+ E 1    LBL U 2     DSE D 3     GTO X 4     FS? 0 5     GTO Y 6     RCL H 7     RCL/ C 8     e^x 9     ENTER 10     ENTER 11     1/x 12     STO J 13     R↓ 14     R↓ 15     RCL- J 16     R↑ 17     R↑ 18     + 19     RCL* I 20     R↓ 21     RCL/ G 22     R↑ 23     RCL/ G 24    π 25     * 26     RCL/ C 27     x<>y 28     RCL G 29     √x 30     / 31     - 32     RCL C 33     √x 34     * 35     π 36    4 37     * 38     / 39     ENTER 40     ISG C 41     CLx 42     GTO Z 1    LBL Y 2     RCL G 3     π 4     RCL/ C 5     x^2 6     * 7    12 8     / 9     STO D 10     SGN 11     ENTER 12     x≠0? 13     GTO M 14    1 15     + 1    LBL M 2     STO F 3     ENTER 1    LBL N 2     STO J 3     R↓ 4     R↓ 5     x<> J 6     R↑ 7     R↑ 8     x<> J 9     RCL* D 10     RCL F 11     STO J 12     R↓ 13     RCL/ J 14     R↑ 15    1 16     + 17     STO F 18     / 19     STO J 20     R↓ 21     RCL+ J 22     R↓ 23     x<> J 24     R↑ 25     R↑ 26     x<> J 27     x≠y? 28     GTO N 29     π 30     RCL/ C 31     x^2 32     * 33    2 34     STO+ C 35    6 36     * 37     / 38     x<>y 39     R↓ 40     ENTER 1    LBL Z 2     RCL* E 3     RCL+ B 4     STO B 5     x<>y 6     RCL+ B 7     RND 8     x<>y 9     RND 10     x≠y? 11     GTO O 12     ALL 13     RTN
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)