OFFSET

2,2

COMMENTS

n^n is an interprime, the average of two consecutive primes, presumably only for n = 2, 6 and 9. In general n^n may be average of several pairs of primes, in which case the minimal distance is in the sequence. It is not clear (but quite probable) that for all n, n^n is the average of two primes. See also n! and n!! as average of two primes in A075409 and A075410.

FORMULA

n^n -/+ a(n) are both primes, with a(n) being the smallest common distance.

EXAMPLE

a(4)=15 because 4^4=256 and 256 -/+ 15 = 271 and 241 are primes with smallest distance from 4^4; a(23)= 10800 because 23^23 = 20880467999847912034355032910567 and 23^23 -/+ 10800 are two primes with the smallest distance from 23^23.

MATHEMATICA

fm[n_]:=Module[{n2=n^n, m=1}, While[!PrimeQ[n2+m]||!PrimeQ[n2-m], m++]; m]; Array[fm, 50, 2] Harvey P. Dale, May 19 2012

CROSSREFS

KEYWORD

nonn

AUTHOR

Zak Seidov, Sep 18 2002

EXTENSIONS

More terms from Lior Manor Sep 18 2002

Corrected by Harvey P. Dale, May 19 2012

STATUS

approved