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.

A011543 Decimal expansion of e truncated to n places.

Original entry on oeis.org

2, 27, 271, 2718, 27182, 271828, 2718281, 27182818, 271828182, 2718281828, 27182818284, 271828182845, 2718281828459, 27182818284590, 271828182845904, 2718281828459045, 27182818284590452, 271828182845904523, 2718281828459045235, 27182818284590452353, 271828182845904523536
Offset: 0

Views

Author

Keywords

Comments

a(n) <= A011544(n) <= a(n)+1. - Danny Rorabaugh, Mar 07 2015

Crossrefs

Programs

  • Mathematica
    Module[{nn=30,edgs},edgs=RealDigits[E,10,nn][[1]];Table[ FromDigits[ Take[ edgs, n]],{n,nn}]] (* Harvey P. Dale, Oct 04 2017 *)
  • PARI
    a(n) = floor(exp(1)*10^n); \\ Michel Marcus, Mar 08 2015
    
  • Python
    from sympy import E
    def a(n): return int(E*10**n)
    print([a(n) for n in range(21)]) # Michael S. Branicky, Feb 27 2021

Formula

a(n) = floor(e*10^n).