Problem 24 done. algorithim starts assuming we didn't calculate any digits before hand, and is still lightning fast, but a small speedup could come from giving 2 and 7 as the first digits, as can easily be confirmed with a calculator