The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
HP 40gs Programming: Bug or Blindness?
10-03-2017, 12:30 PM
Post: #1
HP 40gs Programming: Bug or Blindness?
For natural number input I claim the programme below should produce the sequence

https://oeis.org/A018800

However the calculator resolutely refuses to deliver the members of the sequence.

Is this a defect of the calculator or have I repeatedly missed an error in the programme?

Any suggestions how to get it to work?

Code:
Ans►N:
IF NOT ISPRIME?(Ans)
THEN
0►E:
FOR D=1 TO 6;
N*10►N:
FOR R=1 TO 10^D-1 STEP 2; 
N+R►S:
ISPRIME?(Ans)►E:
IF Ans
THEN
BREAK:
END:
NEXT:
IF E
THEN
BREAK:
END:
NEXT:
S:
END:
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP 40gs Programming: Bug or Blindness? - Gerald H - 10-03-2017 12:30 PM



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