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...

Original entry on oeis.org

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
Offset: 0

Views

Author

Amarnath Murthy, Nov 21 2002

Keywords

Examples

			a(3) = 17 as 3 first occurs in the 17th place after decimal in e. a(18) = 2 = a(182).
		

Crossrefs

Programs

  • Magma
    k := 400; R := RealField(k); [ Position(IntegerToString(Round(10^k*(-2 + Exp(elt)))), IntegerToString(n)) : n in [0..62] ]; /* Klaus Brockhaus, Feb 15 2007 */
    
  • 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 *)
  • 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

Extensions

More terms from Mark Hudson (mrmarkhudson(AT)hotmail.com), Sep 01 2004