[go: up one dir, main page]

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!)
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
print([a(n) for n in range(63)]) # Michael S. Branicky, Jul 10 2022
CROSSREFS
Sequence in context: A051310 A010224 A100081 * A070704 A317753 A298059
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Nov 21 2002
EXTENSIONS
More terms from Mark Hudson (mrmarkhudson(AT)hotmail.com), Sep 01 2004
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 August 29 17:19 EDT 2024. Contains 375518 sequences. (Running on oeis4.)