OFFSET
0,1
LINKS
T. D. Noe, Table of n, a(n) for n=0..9999
EXAMPLE
a(3) = 17 as 3 first occurs in the 17th place after decimal in e. a(18) = 2 = a(182).
MATHEMATICA
With[{estr=ToString[FromDigits[Rest[RealDigits[E, 10, 500][[1]]]]]}, Transpose[ Table[First[StringPosition[estr, ToString[n]]], {n, 0, 80}]][[1]]] (* Harvey P. Dale, Dec 20 2010 *)
With[{ee=Rest[RealDigits[E, 10, 500][[1]]]}, Transpose[ Flatten[ Table[ SequencePosition[ee, IntegerDigits[ n], 1], {n, 0, 70}], 1]][[1]]] (* The program uses the SequencePosition function from Mathematica version 10 *) (* Harvey P. Dale, Mar 17 2016 *)
PROG
(Magma) k := 400; R := RealField(k); [ Position(IntegerToString(Round(10^k*(-2 + Exp(elt<R | 1, 0>)))), IntegerToString(n)) : n in [0..62] ]; /* Klaus Brockhaus, Feb 15 2007 */
(Python)
from sympy import E
digits_of_e = str(E.n(10**5))[1:-1] # raise to 10**6 for b-file
def a(n):
nloc = digits_of_e.find(str(n))
assert nloc > 0, ("Increase precision", n)
return nloc
print([a(n) for n in range(63)]) # Michael S. Branicky, Jul 10 2022
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Nov 21 2002
EXTENSIONS
More terms from Mark Hudson (mrmarkhudson(AT)hotmail.com), Sep 01 2004
STATUS
approved