(38G) First Programme for HP 38G: Integer Partitions (Using Gauss' Method) - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (38G) First Programme for HP 38G: Integer Partitions (Using Gauss' Method) (/thread-1361.html) |
(38G) First Programme for HP 38G: Integer Partitions (Using Gauss' Method) - Gerald H - 05-20-2014 06:01 PM Edit: More easily readable & faster programme. The programme's name is P4. Input a positive integer in the Home screen & actuate the programme. For input N = 6 the screen displays: p(6) 11 Exact to N = 180 Ans+1►N: MAKELIST(1,X,1,N,1)►L1: FOR I=2 TO N STEP 1; 1►H: -1►V: I-1►K: 0►A: WHILE K>0 REPEAT A*V+L1(K)►A: FLOOR(2^V*H+1)►H: -V►V: K-H►K: END: ABS(A)►L1(I): END: ERASE: DISP 2;" p("N-1"):": DISP 4;" "L1(N): DISP 6;"Exact to N = 180": BEEP 1953;.18: FREEZE: You may find this link: http://en.wikipedia.org/wiki/Partition_(number_theory) informative concerning partitions. RE: First Programme for HP 38G: Integer Partitions (Improved Programme) - Gerald H - 03-28-2015 05:38 AM Edit: Improved programme. |