cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A078197 Position of the start of the first occurrence of n after the decimal point in e = 2.71828182845904523536...

This page as a plain text file.
%I A078197 #16 Jul 10 2022 16:07:02
%S A078197 13,2,4,17,10,11,20,1,3,12,195,200,370,27,223,201,94,88,2,108,111,87,
%T A078197 252,16,33,92,30,62,4,131,71,189,110,142,143,17,19,270,85,106,66,124,
%U A078197 97,134,239,10,103,25,228,34,235,93,15,18,76,301,153,38,325,11,20,242,32
%N A078197 Position of the start of the first occurrence of n after the decimal point in e = 2.71828182845904523536...
%H A078197 T. D. Noe, <a href="/A078197/b078197.txt">Table of n, a(n) for n=0..9999</a>
%e A078197 a(3) = 17 as 3 first occurs in the 17th place after decimal in e. a(18) = 2 = a(182).
%t A078197 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 *)
%t A078197 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 *)
%o A078197 (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 */
%o A078197 (Python)
%o A078197 from sympy import E
%o A078197 digits_of_e = str(E.n(10**5))[1:-1] # raise to 10**6 for b-file
%o A078197 def a(n):
%o A078197     nloc = digits_of_e.find(str(n))
%o A078197     assert nloc > 0, ("Increase precision", n)
%o A078197     return nloc
%o A078197 print([a(n) for n in range(63)]) # _Michael S. Branicky_, Jul 10 2022
%Y A078197 Cf. A001113, A014777, A143504.
%K A078197 base,nonn
%O A078197 0,1
%A A078197 _Amarnath Murthy_, Nov 21 2002
%E A078197 More terms from Mark Hudson (mrmarkhudson(AT)hotmail.com), Sep 01 2004