OFFSET
1,2
COMMENTS
Explicitly, abs( e^k - (prevprime(e^k)+nextprime(e^k))/2 ) < 1.
For k>1, the formula (prevprime(e^k)+nextprime(e^k))/2 either gives floor(e^k), for k = 61, 74, 2170, ..., or gives ceiling(e^k), for k = 3, 16, 91, 113, 1441, 1566, 2499, ... This partitions {a(n)}\{1} into two subsequences each of which can be conjectured to have relative density 1/2.
In cases k = 16, 61, 113, 2499, ... the distance is actually less than 0.5. Then the formula (prevprime(e^k)+nextprime(e^k))/2 yields round(e^k), the nearest integer to e^k.
EXAMPLE
For k=16, e^16 is about 8886110.52. The next prime is 8886113, and the previous prime is 8886109, and their average 8886111 is at a distance of about 0.48 away from e^16.
PROG
(PARI) default(realprecision, 2000); for(k=1, +oo, r=exp(k); abs(r-(precprime(r)+nextprime(r))/2)<1&&print1(k, ", "))
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Jeppe Stig Nielsen, Feb 14 2024
STATUS
approved