OFFSET
0,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 0..500
MATHEMATICA
NextPrime[ n_Integer ] := Module[ {k = n + 1}, While[ ! PrimeQ[ k ], k++ ]; Return[ k ] ]; PrevPrime[ n_Integer ] := Module[ {k = n - 1}, While[ ! PrimeQ[ k ], k-- ]; Return[ k ] ]; Do[ a = Round[ N[ E^n ] ]; b = NextPrime[ Round[ N[ E^n ] ] - 1 ]; c = PrevPrime[ Round[ N[ E^n ] ] + 1 ]; If[ b - N[ E^n ] > N[ E^n ] - c, Print[ c ], Print[ b ] ], {n, 0, 25} ]
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Corrected and extended by Robert G. Wilson v, Sep 16 2000
STATUS
approved