- Code Golf: Generate List of Prime Numbers
- 08 Sep 2022 06:29:47 pm
- Last edited by NoahK on 10 Sep 2022 01:55:23 pm; edited 2 times in total
After some searching, I could not find a previous TI-BASIC golf challenge in this fashion.
Write the smallest TI-BASIC program that generates the first 999 primes and puts them in a list, either in Ans or in a list variable.
No external data allowed, or pre-loading variables or lists outside of the program.
Score is size-on-calc - 9 - length of program name, as normal.
Leaderboard:
Here is my submission:
Write the smallest TI-BASIC program that generates the first 999 primes and puts them in a list, either in Ans or in a list variable.
No external data allowed, or pre-loading variables or lists outside of the program.
Score is size-on-calc - 9 - length of program name, as normal.
Leaderboard:
- calc84maniac: 25 bytes
NoahK: 27 bytes
Here is my submission:
NoahK wrote:
{2
For(A,3,|E4
If not(sum(not(fPart(A/Ans
augment(Ans,{A
End
For(A,3,|E4
If not(sum(not(fPart(A/Ans
augment(Ans,{A
End