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-4 of 4 results.

A233208 A measure of quality (the higher the better) for the approximation to e by rationals A022852(n)/n.

Original entry on oeis.org

3, 2, 6, 7, 2, 3, 35, 3, 2, 5, 10, 2, 2, 17, 4, 2, 4, 14, 2, 2, 11, 5, 2, 4, 23, 3, 2, 8, 5, 2, 3, 66, 3, 2, 7, 7, 2, 3, 76, 3, 2, 5, 8, 2, 3, 24, 4, 2, 5, 11, 2, 2, 14, 4, 2, 4, 17, 2, 2, 10, 5, 2, 3, 33, 3, 2, 8, 6, 2, 3, 502, 3, 2, 6, 7, 2, 3, 38, 3, 2, 5, 9, 2, 2, 18, 4, 2, 4, 13, 2, 2, 12, 5, 2, 4, 22
Offset: 1

Views

Author

Franz Vrabec, Dec 06 2013

Keywords

Comments

a(n) is the greatest natural number such that abs( n*e-A022852(n) ) < 1/a(n). Trivially a(n)>=2. a(n)=2 iff n is in A191104 (easy proof).

Examples

			a(7) = 35 because floor(1/abs(7*e-19)) = floor(1/0.0279727...) = floor(35.749...) = 35.
		

Crossrefs

Cf. A022852. For records see A233209, A007677.

Programs

  • PARI
    a(n)=floor(1/abs(n*exp(1)-round(n*exp(1)))) \\ Ralf Stephan, Dec 13 2013

Formula

a(n) = floor( 1 / abs( n*e-A022852(n) ) ).

Extensions

More terms from Ralf Stephan, Dec 13 2013

A022843 Beatty sequence for e: a(n) = floor(n*e).

Original entry on oeis.org

0, 2, 5, 8, 10, 13, 16, 19, 21, 24, 27, 29, 32, 35, 38, 40, 43, 46, 48, 51, 54, 57, 59, 62, 65, 67, 70, 73, 76, 78, 81, 84, 86, 89, 92, 95, 97, 100, 103, 106, 108, 111, 114, 116, 119, 122, 125, 127, 130, 133, 135, 138, 141, 144, 146, 149, 152, 154, 157, 160
Offset: 0

Views

Author

Keywords

Comments

a(n) <= A022852(n) <= A121384(n). - Reinhard Zumkeller, Mar 17 2015

Crossrefs

Programs

  • Haskell
    a022843 n = a022843_list !! n
    a022843_list = map (floor . (* e) . fromIntegral) [0..] where e = exp 1
    -- Reinhard Zumkeller, Jul 06 2013
    
  • Magma
    [Floor(n*Exp(1)): n in [0..60]]; // G. C. Greubel, Sep 28 2018
  • Maple
    A022843 := proc(n)
        floor(n*exp(1)) ;
    end proc: # R. J. Mathar, Jan 25 2015
  • Mathematica
    Table[ Floor[n*E], {n, 1, 61}]
  • PARI
    for (n=0, 100, print1(floor(n*exp(1)),", ")) \\ Indranil Ghosh, Mar 21 2017
    
  • Python
    import math
    from mpmath import mp, e
    mp.dps = 100
    print([int(math.floor(n*e)) for n in range(51)]) # Indranil Ghosh, Mar 21 2017
    

Formula

a(n)/n converges to e because |a(n)/n-e|=|a(n)-n*e|/n < 1/n. - Hieronymus Fischer, Jan 22 2006

A121384 a(n) = ceiling(n*e).

Original entry on oeis.org

0, 3, 6, 9, 11, 14, 17, 20, 22, 25, 28, 30, 33, 36, 39, 41, 44, 47, 49, 52, 55, 58, 60, 63, 66, 68, 71, 74, 77, 79, 82, 85, 87, 90, 93, 96, 98, 101, 104, 107, 109, 112, 115, 117, 120, 123, 126, 128, 131, 134, 136, 139, 142, 145, 147, 150, 153, 155, 158, 161, 164, 166
Offset: 0

Views

Author

Mohammad K. Azarian, Sep 06 2006

Keywords

Comments

Because the difference between e=A001113 and the constant 1/(1-theta), theta = A102525, defined in A054414 is only 0.00877, the difference |a(n)-A054414(n)| increases approximately as 0.00877*n. - R. J. Mathar, Apr 14 2008
A022843(n) <= A022852(n) <= a(n). - Reinhard Zumkeller, Mar 17 2015

Crossrefs

Programs

A319795 a(n) = n^(n+1)/(n-1)^n for n>1, rounded to nearest integer.

Original entry on oeis.org

8, 10, 13, 15, 18, 21, 23, 26, 29, 31, 34, 37, 40, 42, 45, 48, 50, 53, 56, 59, 61, 64, 67, 69, 72, 75, 78, 80, 83, 86, 88, 91, 94, 97, 99, 102, 105, 107, 110, 113, 116, 118, 121, 124, 126, 129, 132, 135, 137, 140, 143, 145, 148, 151, 154, 156, 159, 162, 164
Offset: 2

Views

Author

Jim Singh, Sep 28 2018

Keywords

Crossrefs

Programs

  • Maple
    seq(round(n^(n+1)/(n-1)^n),n=1..100); # Muniru A Asiru, Sep 28 2018
  • PARI
    for(n=2,30,print1(round(n^(n+1)/(n-1)^n),","))
Showing 1-4 of 4 results.