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.

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

A054385 Beatty sequence for e/(e-1); complement of A022843.

Original entry on oeis.org

1, 3, 4, 6, 7, 9, 11, 12, 14, 15, 17, 18, 20, 22, 23, 25, 26, 28, 30, 31, 33, 34, 36, 37, 39, 41, 42, 44, 45, 47, 49, 50, 52, 53, 55, 56, 58, 60, 61, 63, 64, 66, 68, 69, 71, 72, 74, 75, 77, 79, 80, 82, 83, 85, 87, 88, 90, 91, 93, 94, 96, 98, 99, 101, 102, 104, 105, 107, 109
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A022843.
Cf. A108599.

Programs

  • Haskell
    a054385 n = a054385_list !! n
    a054385_list = map (floor . (* e') . fromIntegral) [1..]
       where e' = e / (e - 1); e = exp 1
    -- Reinhard Zumkeller, Jul 06 2013
    
  • Maple
    A054385 := proc(n)
        floor(n*exp(1)/(exp(1)-1)) ;
    end proc: # R. J. Mathar, Jan 25 2015
  • Mathematica
    a[n_] := Floor[n E/(E - 1)];
    Array[a, 100] (* Jean-François Alcover, Mar 24 2020 *)
  • Python
    from sympy import E
    print([n*E//(E-1) for n in range(1, 70)]) # Karl V. Keller, Jr., Aug 07 2020

A108591 Self-inverse integer permutation induced by Beatty sequences for Pi and Pi/(Pi-1).

Original entry on oeis.org

3, 6, 1, 9, 12, 2, 15, 18, 4, 21, 25, 5, 28, 31, 7, 34, 37, 8, 40, 43, 10, 47, 50, 53, 11, 56, 59, 13, 62, 65, 14, 69, 72, 16, 75, 78, 17, 81, 84, 19, 87, 91, 20, 94, 97, 100, 22, 103, 106, 23, 109, 113, 24, 116, 119, 26, 122, 125, 27, 128, 131, 29, 135, 138, 30, 141, 144
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 11 2005

Keywords

Crossrefs

Formula

a(A022844(n))=A054386(n) and a(A054386(n))=A022844(n).

Extensions

a(53)/a(54) joined by Georg Fischer, May 24 2022
Showing 1-3 of 3 results.