How to find all prime factors of $p_1^{p_2}-1$

67 Views Asked by At

I would like to know how to find all prime factors of $p_1^{p_2}-1$, where $p_1$ and $p_2$ are both primes.

Can you please give an example where $p_1=7$ and $p_2=19$?

What I have is that all the factors of $p_1-1$ should be included and the order of elements should be used.

Thanks!

1

There are 1 best solutions below

2
On

Caution: you really do need to check the prime factors of $p-1.$ Your number $7^{19} - 1$ is divisible by both $2$ and $3$

I think the hint you were given amounts to Fermat's Little Theorem. If we have primes $p,q,r,$ also $\gcd(r, p-1) = 1$ and $$ p^q \equiv 1 \pmod r, $$ we use the fact that $$ p^{r-1} \equiv 1 \pmod r $$ to conclude that $r-1$ is divisible by $q.$ For some $t$ we have $r-1=qt,$ or $r = qt+1,$ or $r \equiv 1 \pmod q$

Here are the first fifty useful primes:

    191    229    419    457    571    647    761   1103   1217   1483
   1559   1597   1787   1901   2053   2129   2243   2281   2357   2699
   2851   2927   3041   3079   3307   3877   4219   4409   4447   4523
   4561   4637   4751   4789   4903   5701   6043   6271   6689   6803
   6841   6917   7069   7297   7411   7487   7639   7753   7829   7867

As Robert says, there is also a very large prime factor. It is also $1 \pmod {19}$