On 8/19/2022 10:38 PM,
henh...@gmail.com wrote:
> ( 30 ^ 13 + 13 ^ 30 ) ---- Is this a prime number ?
[spoiler space]
Firing up 'bc' on my home server, I found:
30 ^ 13 = 15943230000000000000
13 ^ 30 = 2619995643649944960380551432833049
sum = 2619995643649960903610551432833049
Trial and error shows that this is composite, equaling
31 * 84515988504837448503566175252679
= 31 * 59 * 1432474381437922855992647038181
(no other factors > 1 and < 100)
There's also
https://www.calculator.net/factor-calculator.html
but it only works on numbers up to 10^13, whereas we've only reduced
things to around 10^30 so far.
If you don't have a calculator handy that can handle numbers this large,
then you can also work it out by choosing a potential prime factor, then
reducing intermediate computations modulo that prime, e.g.
30 ^ 1 = 30 (mod 31)
30 ^ 2 = 30 * 30 = 900 = 1 (mod 31)
30 ^ 3 = 1 * 30 = 30 (mod 31)
...
30 ^ 13 = 30 (mod 31)
and
13 ^ 1 = 13 (mod 31)
13 ^ 2 = 13 * 13 = 169 = 14 (mod 31)
13 ^ 3 = 14 * 13 = 182 = 27 (mod 31)
13 ^ 4 = 27 * 13 = 351 = 10 (mod 31)
13 ^ 5 = 10 * 13 = 130 = 6 (mod 31)
13 ^ 30 = (13 ^ 5) ^ 6 = 6 ^ 6 = 46656 = 1 (mod 31)