Hey guys, long time no see! I just wanted to show you guys a one-liner I'm pretty proud of that determines whether a number is prime or not. It gives an error for numbers less than 16 and greater than 266255, for two reasons I'll leave as puzzles for you guys to determine. (Pretty nifty TI-Basic programming puzzles/tests of binomcdf understanding if you ask me). At the longest the code takes 2-3 seconds to determine whether the number is prime, which is pretty good for TI-Basic! Anyway, here's the code!
:Input N
:not(max(not(fPart(N/augment({2},1+2cumSum(binomcdf(int(.5√N))-1,0
Try it out for yourself! Any optimizations you got? I suspect there might be a way to make the not(max(not part at the beginning more efficient but I couldn't figure anything out.