Notice that n5+n4+1=(n2+n+1)(n3−n+1).
That means, for all n2+n+1≠1 and n3−n+1≠1, n5+n4+1 is composite.
This means when n5+n4+1 is prime, n2+n=0 or n3=n
Solving, we get n = -1 (rejected) or n = 0 (rejected) or n = 1.
When n = 1, n5+n4+1=3, which is a prime.
The only possibility is n = 1.