OFFSET
1,1
COMMENTS
If the "2" at the beginning of e is included, the only values for n <= 1000 that change are a(1) = 2, a(3) = 271 and a(85) = 2718281828459045235360287471352662497757247093699959574966967627724076630353547594571.
For another version starting with 2 see A095935. - Omar E. Pol, Oct 24 2011
LINKS
Dan Drake, Table of n, a(n) for n = 1..1000
Pegg, E. Jr. and Weisstein, E. W. Mathematica's Google Aptitude. MathWorld Headline news, Oct 13, 2004.
EXAMPLE
7427466391 is the first 10-digit prime found in consecutive digits of e, so a(10) = 7427466391.
PROG
(Sage)
def a(digits):
bits = 0
pos = 0
while True:
bits += (digits * 4) + 50
decimals = RealField(bits, rnd='RNDZ')(exp(1)).frac().str()[2:]
for s in range(pos, len(decimals) - digits + 1):
if decimals[s] != '0':
i = Integer(decimals[s:s+digits])
if i.is_prime():
return i
pos = len(decimals) - digits + 1
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Dan Drake, Apr 18 2008
STATUS
approved