OFFSET
0,1
COMMENTS
Let p = prime(i), q = prime(i+1), r = prime(i+2).
(*) p^n + q^n + r^n has to be a prime.
When n is even and p > 3, then (*) is composite because primes greater than 3 are either of form 6k-1 or 6k+1 for some k. Hence, squares (or any even power) of such a prime has the form 6k+1. Adding three such even powers will produce a number of the form 6k+3, which is divisible by 3.
When n is even and p = 3, sequence A160773 gives the even n for which 3^n + 5^n + 7^n is prime.
LINKS
Robert Israel, Table of n, a(n) for n = 0..500
EXAMPLE
5 + 7 + 11 = 23 = prime(9); 3^2 + 5^2 + 7^2 = 83 = prime(23); 23^3 + 29^3 + 31^3 = 66347 = prime(6616).
MAPLE
f:= proc(n) local p, q, r;
if n::even then
if isprime(3^n+5^n+7^n) then return 3
else return 0
fi
fi;
p:= 2: q:= 3: r:= 5:
while not isprime(p^n + q^n + r^n) do
p:= q; q:= r; r:= nextprime(r)
od;
p
end proc:
f(0):= 2:
map(f, [$0..100]);
CROSSREFS
KEYWORD
nonn
AUTHOR
Ulrich Krug (leuchtfeuer37(AT)gmx.de), Apr 21 2010
EXTENSIONS
a(0) term added by T. D. Noe, Nov 23 2010
STATUS
approved