How to convince Sage that integer^(positive integer) is an integer?

asked 2023-03-26 21:25:46 +0100

rebeccarohrlich gravatar image

As title. If p and k are integers, and k is positive, then p^k should be an integer. Why is Sage telling me otherwise, and how can I convince it of the truth?

sage: var('p,k')

(p, k)

sage: assume(p,'integer')

sage: assume(k,'integer')

sage: assume(k>0)

sage: alpha = p^k

sage: alpha.is_integer()


edit retag flag offensive close merge delete