Alon Amit on Quora · 2015-06-12

Is (a googol plus 1) prime?

No, googol+1 isn't prime and you don't need a computer to see that.

If m is odd, then

(-1)^m=-1

so

(-1)^m+1=0

or put differently, -1 is a root of the polynomial X^m+1, which is the same as saying that the polynomial X^m+1 is divisible by the polynomial X+1.

This means that whatever positive integer you substitute for X in X^m+1 when m is odd, the result will be divisible by X+1. So, X^m+1 cannot be prime (once m>1 and X>1).

This is why 2^5+1=33 is divisible by 2+1=3.

This is why 10^3+1=1001 is divisible by 10+1=11.

This is why 77^{77}+1 is divisible by 77+1=78. I don't even need to calculate that number; I already know it's divisible by 78.

So, all we need to do is take m=25 (which is odd) and X=10^4 to find that

(10^4)^{25}+1 is divisible by 10^4+1.

So googol+1 is divisible by 10,001. It is not a prime number.

By the same argument you can conclude that googolplex+1=10^{10^{100}}+1, which is a considerably larger number, is not prime either. This kind of reasoning lets you handle such questions systematically, rather than relying on your computer to factor numbers that happen to be small enough. In fact, if you understand and can prove the statement about googolplex+1, congratulations: you're smarter than Wolfram Alpha.

In fact, nothing of the form "(A to the B)+1" is ever prime except possibly when B is a power of 2, in which case you can't find an odd m dividing it.

This is why when searching for primes of the form 2^n+1 we only need to focus on those that are actually of the form 2^{2^k}+1. These are known as "Fermat numbers" because Fermat thought they're all, indeed, prime. He was dead wrong about this; other than the first few, they actually seem to never be prime, for reasons we don't understand.

Originally posted on Quora: https://qr.ae/pFmzuA