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.

A003153 a(n) = integer nearest n*(1+sqrt(2)).

Original entry on oeis.org

2, 5, 7, 10, 12, 14, 17, 19, 22, 24, 27, 29, 31, 34, 36, 39, 41, 43, 46, 48, 51, 53, 56, 58, 60, 63, 65, 68, 70, 72, 75, 77, 80, 82, 84, 87, 89, 92, 94, 97, 99, 101, 104, 106, 109, 111, 113, 116, 118, 121, 123, 126, 128, 130, 133, 135, 138, 140, 142, 145
Offset: 1

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Programs

  • Magma
    [Round(n*(1+Sqrt(2))): n in [1..100]]; // G. C. Greubel, Aug 16 2018
  • Mathematica
    ni[n_]:=Module[{c=1+Sqrt[2],a,b,x},x=c n;a=Floor[x];b=Ceiling[x]; If[x-aHarvey P. Dale, May 04 2011 *)
    Table[Round[n*(1 + Sqrt[2])], {n, 1, 100}] (* G. C. Greubel, Aug 16 2018 *)
  • PARI
    a(n) = round(n*(1+sqrt(2))); \\ Michel Marcus, Sep 07 2017
    

Extensions

Better description 1/97.