

A272032


Positive integers n such that (q^n + r^n)/(q+r) is prime, where q is the number of consecutive composite numbers smaller than n and r is the number of consecutive composite numbers greater than n.


0




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


LINKS



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=nprecprime(n1)1, r=nextprime(n+1)n1, 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=((qp1)^q+(rq1)^q)/(rp2); 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



EXTENSIONS



STATUS

approved



