Is there a program, script, batch file, etc. that I can play with that calculates whether or not p-1 is worthwhile, given certain parameters? I've got a weird brain, so I'd be interested in playing with something like that.