login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A037028 Prime closest to e^n. 5
2, 3, 7, 19, 53, 149, 401, 1097, 2971, 8101, 22027, 59879, 162751, 442399, 1202603, 3269011, 8886109, 24154957, 65659969, 178482289, 485165237, 1318815713, 3584912833, 9744803443, 26489122147, 72004899319 (list; graph; refs; listen; history; text; internal format)
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
Sequence in context: A122724 A256758 A033844 * A052919 A005807 A167422
KEYWORD
nonn
AUTHOR
EXTENSIONS
Corrected and extended by Robert G. Wilson v, Sep 16 2000
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 10:07 EDT 2024. Contains 371905 sequences. (Running on oeis4.)