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.

Showing 1-3 of 3 results.

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

A011548 Decimal expansion of sqrt(2) rounded to n places.

Original entry on oeis.org

1, 14, 141, 1414, 14142, 141421, 1414214, 14142136, 141421356, 1414213562, 14142135624, 141421356237, 1414213562373, 14142135623731, 141421356237310, 1414213562373095, 14142135623730950, 141421356237309505, 1414213562373095049, 14142135623730950488, 141421356237309504880
Offset: 0

Views

Author

Keywords

References

  • W. Rudin, Principles of Mathematical Analysis, 3rd ed., McGraw-Hill, 1976.

Crossrefs

Programs

  • Mathematica
    Round[Table[N[Sqrt[2], k] 10^(k - 1), {k, 20}]] (* Vincenzo Librandi, Aug 17 2013 *)
    Module[{nn=20,s},s=RealDigits[Sqrt[2],10,nn+1][[1]];Table[Round[ FromDigits[ Take[ s,n+1]]/10],{n,nn}]] (* Harvey P. Dale, Apr 04 2019 *)
  • Python
    from math import isqrt
    def A011548(n): return (m:=isqrt(k:=10**(n<<1)<<1))+int((k-m*(m+1)<<2)>=1) # Chai Wah Wu, Jul 29 2022

A361612 Decimal expansion of sqrt(10) truncated to n places (after the decimal point).

Original entry on oeis.org

3, 31, 316, 3162, 31622, 316227, 3162277, 31622776, 316227766, 3162277660, 31622776601, 316227766016, 3162277660168, 31622776601683, 316227766016837, 3162277660168379, 31622776601683793, 316227766016837933, 3162277660168379331, 31622776601683793319
Offset: 0

Views

Author

Amit Katz, Mar 17 2023

Keywords

Crossrefs

Programs

  • Mathematica
    Floor[Sqrt[10]*10^Range[0, 20]] (* Paolo Xausa, Jul 25 2024 *)
  • Python
    from math import isqrt
    def A361612(n): return isqrt(10**((n<<1)|1)) # Chai Wah Wu, Mar 26 2023

Formula

a(n) = floor(sqrt(10) * 10^n).
a(n) = A017934(2*n + 1).
a(n-1) mod 10 = A010467(n). - Chai Wah Wu, Mar 26 2023
Showing 1-3 of 3 results.