Post Reply 
Prime number finder HP11C?
06-19-2016, 02:55 PM
Post: #18
RE: Prime number finder HP11C?
(06-19-2016 01:14 PM)jbhp55 Wrote:  the search for a divisor is always continued up to the square root, but that is the consequence of the fact that you cannot branch out of a sum.

You may not be able to branch out of a sigma loop, but you can stop the loop by performing an illegal operation. Here is an example of that.

This is a solver equation that shows the prime factors of a number, one factor at a time. Enter the number you want to factor, then press N. Then press FACT. When it finds a factor, it performs an illegal operation (divide by 0) after storing the factor in FACT. The calculator will beep and display "SOLUTION NOT FOUND". You can then RCL FACT and it will show you the factor it found. Then press FACT to find the next factor, then RCL FACT when it displays the error message. It is done when it displays the last factor without you having to RCL it.

IF(MOD(N:2)=0:L(FACT:2)+L(N:N\(\div\)2)\(\div\)0:\(\Sigma\)(I:3:SQRT(N):2:IF(MOD​(N:I)=0:L(FACT:I)+L(N:N\(\div\)I)\(\div\)0:0))+N)-FACT
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Prime number finder HP11C? - jbhp55 - 06-13-2016, 07:15 PM
RE: Prime number finder HP11C? - jbhp55 - 06-14-2016, 06:33 AM
RE: Prime number finder HP11C? - TASP - 06-14-2016, 11:35 PM
RE: Prime number finder HP11C? - jbhp55 - 06-16-2016, 07:56 PM
RE: Prime number finder HP11C? - jbhp55 - 06-17-2016, 07:08 AM
RE: Prime number finder HP11C? - Dieter - 06-17-2016, 06:42 PM
RE: Prime number finder HP11C? - Marcio - 06-27-2016, 10:17 PM
RE: Prime number finder HP11C? - jbhp55 - 06-17-2016, 10:43 AM
RE: Prime number finder HP11C? - rprosperi - 06-18-2016, 10:27 PM
RE: Prime number finder HP11C? - bshoring - 06-18-2016, 07:23 PM
RE: Prime number finder HP11C? - jbhp55 - 06-19-2016, 01:14 PM
RE: Prime number finder HP11C? - Don Shepherd - 06-19-2016 02:55 PM
RE: Prime number finder HP11C? - rprosperi - 06-19-2016, 08:03 PM
RE: Prime number finder HP11C? - jbhp55 - 06-19-2016, 01:17 PM
RE: Prime number finder HP11C? - jbhp55 - 06-19-2016, 05:35 PM
RE: Prime number finder HP11C? - rprosperi - 06-19-2016, 07:25 PM
RE: Prime number finder HP11C? - rprosperi - 06-20-2016, 12:05 AM
RE: Prime number finder HP11C? - jbhp55 - 06-19-2016, 09:28 PM
RE: Prime number finder HP11C? - rprosperi - 06-20-2016, 12:20 AM



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