Thank you very much for your post immediately above. I am impressed by your program code and your example result for n = 1,000,000.
I have not yet understood how to run it myself and will come back again later.
Regarding your questions, GWBasic v 3.20 is below with the usual fake "dot g z" extension needing deletion by renaming.
As to
I'm not very computer language literate so I may not have understood you, but if you wanted to change say, line 30 of "1.BAS" and then save it with a new name you would load 1.BAS by pressing F3 then type 1 and Returnhey, would you mind doing those with the save"filename",a option?
Then instead of using F2 to run 1.BAS you would use F1 to list the program
Then you type edit 30 then make the changes to line 30
Then drop to next line and type save"theNewFileName" (including the inverted commas) or else use F4 to bring up save"
Is there anything more that you would like me to do?
PS My desktop computer is quite fast, but it takes 28 secs to run 1.BAS at its MAX n = 39,602 (35 secs to also show the 4,164 primes).