|
|
A078197
|
|
Position of the start of the first occurrence of n after the decimal point in e = 2.71828182845904523536...
|
|
10
|
|
|
13, 2, 4, 17, 10, 11, 20, 1, 3, 12, 195, 200, 370, 27, 223, 201, 94, 88, 2, 108, 111, 87, 252, 16, 33, 92, 30, 62, 4, 131, 71, 189, 110, 142, 143, 17, 19, 270, 85, 106, 66, 124, 97, 134, 239, 10, 103, 25, 228, 34, 235, 93, 15, 18, 76, 301, 153, 38, 325, 11, 20, 242, 32
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
LINKS
|
|
|
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
More terms from Mark Hudson (mrmarkhudson(AT)hotmail.com), Sep 01 2004
|
|
STATUS
|
approved
|
|
|
|