Re: Congruence equations

Hi,
Since you didn't place any restriction on k, I'll assume k could be from 2 to . Further, I'm assuming you want all solutions x of the congruence xk = a (mod m).

First observation. For a = 1, you're just asking for the elements of Zm which have multiplicative order a divisor of k. From the well known structure of this group, for a given k it's "easy" to specify the number of such solutions. However, I know of no way to easily identify the solutions x.

For a > 1, I don't know of any formula for the number of solutions.

Example: m=15, a=4 and k=6. The 4 solutions are x=2, 7, 8 and 13. Here since phi(15) = 8, x4=1 for any x and so this solution set is the same as for k=2. But I don't see how to generalize this.

Here's a little C program that computes the solutions x for given a, k and m; for small m it's quite reasonable.