OFFSET
1,1
COMMENTS
All terms are prime (conjecture).
The variables q and r are the number of composite numbers between the previous and following successive primes of the number n.
They seem to be extremely rare. I checked them for {q,r}<=15 and n < 10^5.
Numbers n with q + r = 0 lead to 0/0 and are excluded. - Wolfdieter Lang, Apr 22 2016
EXAMPLE
For a(1)=7, q=1 and r=3, (1^7+3^7)/(1+3)=547, 547 is prime.
MATHEMATICA
Select[Range[3, 10^3], Function[n, With[{q = n - NextPrime[n, -1] - 1, r = NextPrime@ n - n - 1}, If[q + r == 0, False, PrimeQ[(q^n + r^n)/(q + r)]]]]] (* Michael De Vlieger, Apr 18 2016 *)
PROG
(PARI) is(n)=my(q=n-precprime(n-1)-1, r=nextprime(n+1)-n-1, t); q+r && denominator(t=(q^n + r^n)/(q+r))==1 && isprime(t) \\ Charles R Greathouse IV, Apr 18 2016
(PARI) list(lim)=my(v=List(), p=2, q=3, t); forprime(r=5, nextprime(lim+1), t=((q-p-1)^q+(r-q-1)^q)/(r-p-2); if(denominator(t)==1 && ispseudoprime(t), listput(v, q)); p=q; q=r); Vec(v) \\ Charles R Greathouse IV, Apr 18 2016
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Marc Morgenegg, Apr 18 2016
EXTENSIONS
a(1) added by Charles R Greathouse IV, Apr 18 2016
STATUS
approved