login
A274096
a(n) = nearest integer to k*sin(sqrt(k)+j*Pi/2) where n = 2*k+j, 0<=j<=1.
12
0, 0, 1, 1, 2, 0, 3, 0, 4, -2, 4, -3, 4, -5, 3, -6, 2, -8, 1, -9, 0, -10, -2, -11, -4, -11, -6, -12, -8, -12, -10, -11, -12, -10, -14, -9, -16, -8, -18, -7, -19, -5, -21, -3, -22, 0, -23, 2, -24, 4, -24, 7, -24, 10, -24, 13, -23, 15, -23, 18, -22, 21, -20, 23, -19, 26, -17, 28, -15, 31, -13, 33
OFFSET
0,5
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())
A274096_list = [f(n, 2) for n in range(10001)] # Chai Wah Wu, Jun 11 2016
CROSSREFS
KEYWORD
sign
AUTHOR
N. J. A. Sloane, Jun 11 2016
STATUS
approved