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.

A272695 Nearest integer to n*sin(n).

Original entry on oeis.org

0, 1, 2, 0, -3, -5, -2, 5, 8, 4, -5, -11, -6, 5, 14, 10, -5, -16, -14, 3, 18, 18, 0, -19, -22, -3, 20, 26, 8, -19, -30, -13, 18, 33, 18, -15, -36, -24, 11, 38, 30, -7, -38, -36, 1, 38, 41, 6, -37, -47, -13, 34, 51, 21, -30, -55, -29, 25, 58, 38, -18, -59, -46, 11, 59, 54, -2, -57, -61, -8, 54, 68, 18
Offset: 0

Views

Author

N. J. A. Sloane, Jun 10 2016

Keywords

Crossrefs

Programs

  • Maple
    f:=n->round(evalf(n*sin(n)));  [seq(f(n),n=0..140)];
  • Mathematica
    Table[Round[n*Sin[n]], {n, 0, 140}] (* Bence Bernáth, Nov 20 2022 *)
  • PARI
    a(n) = round(n*sin(n)) \\ Felix Fröhlich, Jun 10 2016
    
  • Python
    from sympy import sin
    def A272695(n):
        return int((n*sin(n)).round()) # Chai Wah Wu, Jun 10 2016