# Thread: Deciding whether an integer c is an eth power in Z

1. ## Deciding whether an integer c is an eth power in Z

Given any positive integers c and e.

Any hints?

2. ## Re: Deciding whether an integer c is an eth power in Z

Hey jsaetrum.

Can you give an equation or relationship in mathematical form?

3. ## Re: Deciding whether an integer c is an eth power in Z

I tried to express this as a congruence (inverse modulo), i'm not sure it is right, but it seems to be:

$\displaystyle c=m^e$

for any integer m

and thus satisfying the following:

$\displaystyle m^e \equiv 1\mod(c-1)$

4. ## Re: Deciding whether an integer c is an eth power in Z

I can give you a computer procedure (algorithm) to solve it. It best works out using divisions. (If needed, take "large integers package" like BigInteger from Java or something). Keep dividing c by m, until you get a fraction, or c, or a positive number less than c. Of these outcomes, getting c means, it is a power, other outcomes prove that it is not.

Salahuddin
Maths online