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.

A022804 a(n) = B(n) + c(n) where B(n) is Beatty sequence [ n*sqrt(2) ] and c is the complement of B.

Original entry on oeis.org

4, 8, 14, 18, 24, 28, 32, 38, 42, 48, 52, 56, 62, 66, 72, 76, 82, 86, 90, 96, 100, 106, 110, 114, 120, 124, 130, 134, 140, 144, 148, 154, 158, 164, 168, 172, 178, 182, 188, 192, 196, 202, 206, 212, 216, 222, 226, 230, 236, 240, 246, 250, 254, 260
Offset: 1

Views

Author

Keywords

Programs

  • Magma
    [2*(n + Floor(n*Sqrt(2))): n in [1..100]]; // G. C. Greubel, Sep 08 2018
  • Mathematica
    Table[2 n + 2 Floor[n*Sqrt[2]], {n, 1, 200}]
  • PARI
    vector(100, n, 2*(n+floor(n*sqrt(2)))) \\ G. C. Greubel, Sep 08 2018
    

Formula

a(n) = 2*A003151(n) = 2*(n + floor(n*sqrt(2))).