precomputing power lists