login
A274097
a(n) = nearest integer to k*sin(sqrt(k)+j*Pi/2) where n = 3*k+j, 0<=j<3.
12
0, 0, 0, 1, 1, -1, 2, 0, -2, 3, 0, -3, 4, -2, -4, 4, -3, -4, 4, -5, -4, 3, -6, -3, 2, -8, -2, 1, -9, -1, 0, -10, 0, -2, -11, 2, -4, -11, 4, -6, -12, 6, -8, -12, 8, -10, -11, 10, -12, -10, 12, -14, -9, 14, -16, -8, 16, -18, -7, 18, -19, -5, 19, -21, -3, 21, -22, 0, 22, -23, 2, 23, -24, 4, 24, -24, 7
OFFSET
0,7
PROG
(Python)
from sympy import sin, sqrt, pi
def f(n, t = 1):
k, j = divmod(n, t)
return int((k*sin(sqrt(k)+j*pi/2)).round())
A274097_list = [f(n, 3) for n in range(10001)] # Chai Wah Wu, Jun 11 2016
CROSSREFS
KEYWORD
sign
AUTHOR
N. J. A. Sloane, Jun 11 2016
STATUS
approved