I’ve been testing some prime numbers out with the factors function. I tested this Cullen prime: 393050634124102232869567034555427371542904833 and gave it about 21 hours with one core dedicated to it but it never came back.
I tested this Carol prime: 4398042316799 and almost instantly I received:
CL-USER> (factors 4398042316799)
Right now I’m testing this Fibonacci prime: 99194853094755497. Its been going about 20 minutes now with a core dedicated to it, but its not done yet. Certainly the algorithm could be faster, it wasn’t really meant for what I’m having it do now…so these are just tests “for personal interest”.
Here is a really simple function to test for prime-ness. I actually didn’t test it since currently the REPL is tied up with that Fibonacci prime, but it looks like it ought to work…
EDIT: In under 30 minutes (I didn’t see exactly when it happened) the REPL came back with:
CL-USER> (factors 99194853094755497)
I also tested the function and it looks pretty good from my simple tests.