Post Reply 
(35S) Partitions
05-19-2014, 05:48 AM (This post was last modified: 05-16-2020 10:15 AM by Gerald H.)
Post: #1
(35S) Partitions
2020-05-16: Edit: Decided to follow Jeff_Kearns 'scroll-box' suggestion.

Returns number of integer partitions for input integer:

input integer, 0 for all partitions;
input integer, 1 for distinct partitions.

Code:
1    LBL X
2    x≠0?
3    GTO X006
4    CF 0
5    GTO X007
6    SF 0
7    RAD
8    R↓
9    STO A
10    24
11    1/x
12    FS? 0
13    +/-
14    +/-
15    +
16    STO G
17    FS? 0
18    GTO X028
19    √x
20    1.5
21    1/x
22    √x
23    STO I
24    *
25    π
26    *
27    STO H
28    CLx
29    STO B
30    1
31    STO C
32    FIX 0
33    RCL C
34    STO D
35    CLx
36    STO E
37    RCL C
38    RCL D
39    RMDR
40    LASTx
41    x<>y
42    x≠0?
43    GTO X039
44    1
45    +
46    x≠y?
47    GTO X080
48    RCL C
49    x<>y
50    -
51    x=0?
52    GTO X069
53    STO F
54    0.5
55    STO J
56    0
57    RCL D
58    RCL* F
59    RCL/ C
60    FP
61    RCL- J
62    RCL F
63    RCL/ C
64    RCL- J
65    *
66    +
67    DSE F
68    GTO X057
69    4
70    1/x
71    +
72    2*A
73    RCL* D
74    RCL/ C
75    -
76    π
77    *
78    COS
79    STO+ E
80    DSE D
81    GTO X037
82    FS? 0
83    GTO X121
84    RCL H
85    RCL/ C
86    e^x
87    ENTER
88    ENTER
89    1/x
90    STO J
91    R↓
92    R↓
93    RCL- J
94    R↑
95    R↑
96    +
97    RCL* I
98    R↓
99    RCL/ G
100    R↑
101    RCL/ G
102    π
103    *
104    RCL/ C
105    x<>y
106    RCL G
107    √x
108    /
109    -
110    RCL C
111    √x
112    *
113    π
114    4
115    *
116    /
117    ENTER
118    ISG C
119    CLx
120    GTO X176
121    RCL G
122    π
123    RCL/ C
124    x^2
125    *
126    12
127    /
128    STO D
129    SGN
130    ENTER
131    x≠0?
132    GTO X135
133    1
134    +
135    STO F
136    ENTER
137    STO J
138    R↓
139    R↓
140    x<> J
141    R↑
142    R↑
143    x<> J
144    RCL* D
145    RCL F
146    STO J
147    R↓
148    RCL/ J
149    R↑
150    1
151    +
152    STO F
153    /
154    STO J
155    R↓
156    RCL+ J
157    R↓
158    x<> J
159    R↑
160    R↑
161    x<> J
162    x≠y?
163    GTO X137
164    π
165    RCL/ C
166    x^2
167    *
168    2
169    STO+ C
170    6
171    *
172    /
173    x<>y
174    R↓
175    ENTER
176    RCL* E
177    RCL+ B
178    STO B
179    x<>y
180    RCL+ B
181    RND
182    x<>y
183    RND
184    x≠y?
185    GTO X 033
186    ALL
187    RTN

Any improvements or error reports welcome.
Find all posts by this user
Quote this message in a reply
05-25-2014, 03:21 PM (This post was last modified: 05-25-2014 03:23 PM by Jeff_Kearns.)
Post: #2
RE: HP 35S Partitions
(05-19-2014 05:48 AM)Gerald H Wrote:  Returns number of integer partitions for input integer:

input integer, 0 for all partitions;
input integer, 1 for distinct partitions.

Any improvements or error reports welcome.

I, for one, would appreciate more explanation and an example. What is the purpose of the program? What is the definition (via a link) of an integer partition? For instance, something like: "A partition of an integer, n, is one way of writing n as the sum of positive integers where the order of the addends (terms being added) does not matter....". That was taken from this link, which seems to provide a good introduction to Partitions of Integers.

What is the practical application of this program? Also, there is a way to enter the program in a 'scroll-box' so it is not so long on the screen.

Jeff K
Find all posts by this user
Quote this message in a reply
05-26-2014, 10:01 AM
Post: #3
RE: HP 35S Partitions
To post #2:

Purpose: to calculate the number of 2 different types of integer partitions.

Example: one integer partition of "5" is "4+1"

Definition: adequately supplied by the sentence in quotes & the suggested link

Utility: I am not principally interested in usefulness but much rather in improving the programme. Should anyone become rich through using the programme I would ask them not to inform me.

Scroll box: I find the full screen depiction of the programme gives a better overview.

Should the article promote some research, interest, discussion....& improvements to the programme it will have fulfilled my needs.

Thank you for your comments.
Find all posts by this user
Quote this message in a reply
05-16-2020, 09:54 AM
Post: #4
RE: (35S) Partitions
(05-19-2014 05:48 AM)Gerald H Wrote:  Returns number of integer partitions for input integer:

input integer, 0 for all partitions;
input integer, 1 for distinct partitions.

Any improvements or error reports welcome.

Hi, Gerald H !

Your 2014 proposal seems to me to be a more general version than mine devoted to what I called «Some digits for a sum» or dedicated «April 1 recursive program» ?

The term Integer Partitions was unknown to me.

Your initial development seems to me less restrictive than that which I recently published in the sense that I only use figures which must, moreover, all be different!

In any case, your publication appeals to me: I will be interested in it!
So i will examine your program on my 35s!

See you later on this!
Find all posts by this user
Quote this message in a reply
Post Reply 




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