login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
7, 13, 43, 127, 281
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
Cf. A046933.
Sequence in context: A047977 A139403 A087820 * A023286 A287685 A159305
KEYWORD
nonn,more
AUTHOR
Marc Morgenegg, Apr 18 2016
EXTENSIONS
a(1) added by Charles R Greathouse IV, Apr 18 2016
STATUS
approved