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.

A274095 Nearest integer to n*sin(sqrt(n)).

Original entry on oeis.org

0, 1, 2, 3, 4, 4, 4, 3, 2, 1, 0, -2, -4, -6, -8, -10, -12, -14, -16, -18, -19, -21, -22, -23, -24, -24, -24, -24, -23, -23, -22, -20, -19, -17, -15, -13, -10, -7, -5, -1, 2, 5, 8, 12, 15, 19, 22, 25, 29, 32, 35, 39, 42, 45, 47, 50, 52, 54, 56, 58, 60, 61, 62, 63, 63, 64, 64, 63, 63, 62, 61, 60, 58, 56
Offset: 0

Views

Author

N. J. A. Sloane, Jun 11 2016

Keywords

Crossrefs

Programs

  • Maple
    Digits:=50;
    ft:=proc(n,t) local k,j; j:=(n mod t); k:=(n-j)/t;
    round(evalf(k*sin(sqrt(k)+j*Pi/2))); end;
    [seq(ft(n,1),n=0..120)];
  • Python
    from sympy import sin, sqrt, pi
    def A274095(n, t = 1):
        k, j = divmod(n,t)
        return int((k*sin(sqrt(k)+j*pi/2)).round())
    A274095_list = [A274095(n,1) for n in range(10001)] # Chai Wah Wu, Jun 11 2016