# Puzzle: prime numbers

Show that (N^4 + 4^N) is a prime number if and only if N=1.

Tags

1. Decio says:

Ok, let’s crunch some number. The last digit of both terms N^4 and 4^N is a function of the last digit of N.

Thus, if a number ends with 0 1 2 3 4 5 6 7 8 9

the last digit of the sum is    6 5 2 5 2 9 2 5 2 5.

(i.e. 3^4=81 + 4^3=64 gives 155. Note that 5 is the last digit for every number ending with a 3: 83, 657673, and so on).

Every number ending with any of the digits in the second row is not a prime.

This is true for every N integer positive, with the notably exception for N=1, just because 5 (1^4+4^1) ends with, erm, 5, which is prime. Note that with N=0 the result is 1, which is not a prime.

Thank you, Adi, this puzzle reminded me of the time spent learning htonl ðŸ™‚

>> Every number ending with any of the digits in the second row is not a prime.

Well, if the last digit of the sum is "9" (the one you mentioned when N ends with 5) then the number is not necessarily non-prime. For example, 19, 29, 59, 79 are primes.

3. Since these numbers are supposedly composite when N>1, let’s try to find some factors.

If N is even, then both terms are even and their sum is even, so 2 is a factor.  The formula is equal to 5 when N=1 and strictly growing so there must be another factor greater than 1 as well.

If N is odd, we can work out the squares to find a factorization.

4^N+N^4

= (2^N+N^2)^2 – 2N^22^N

= (2^N+N^2)^2 – N^22^(N+1)

= (2^N+N^2)^2 – (N
2^((N+1)/2))^2

= (2^N+N^2+N2^((N+1)/2))(2^N+N^2-N2^((N+1)/2)))

The first factor is 5 when N=1 and strictly growing.

The second factor is 1 when N=1, and if you set M=2^N, then it grows like M-sqrt(M)log(M), which means it is strictly growing as well.

So we’ve found a factorization into two factors greater than 1 when N>1.  Therefore, it’s always composite.

Excellent proof! Yes, there are several approaches to do the factorization, and this is one of them.

5. Castor Fu says:

Am I missing something in the notation?

4*N + N^4 is just N(4 + N^3) so we have a trivial factorization.

6. pirooz says:

Hi to human that not foolish!!!!!!!!!!!

Mr.decio you are goof because your proof is full of wrong method…

7. ssd says:

@Nicholas

well if n is even then your factors are not integral (2^((N+1)/2) being non-integral) therefore more work needs to be done in that case to prove that it is composite.