Even so. Memoize p^2, p^4, p^8, p^16. and compute p^(16*a+b) as (p^16)^a*p^b.2017-01-05 3:30 GMT+02:00 Egor Skriptunoff <firstname.lastname@example.org>:
> On Wed, Jan 4, 2017 at 6:28 PM, Ką Mykolas <email@example.com> wrote:
>> What about memorizing p^(a+k+2) as well?
> Powers are not reusable.
> You need to calculate 50 random powers of the same prime (exponents are
> randomly chosen from 100000 possible variants).