Ask Your Question

mcl1962's profile - activity

2017-10-20 18:13:35 +0200 received badge  Famous Question (source)
2015-03-21 11:20:57 +0200 received badge  Notable Question (source)
2013-07-31 18:23:44 +0200 received badge  Popular Question (source)
2012-08-04 07:21:12 +0200 received badge  Student (source)
2012-02-27 07:39:15 +0200 asked a question Power of a polynomial mod (n, X^r - 1)

I need to calculate (X + a)^n mod (n, X^r - 1), where n can be very large.

I use the following code:

R.<x>=PolynomialRing(Integers(n)) pow(x + a, n, X^r - 1)

A better (i.e. faster) solution?

Thanks.