Optimizes big number discovery, based on code from kai-koch