login
a(n) = nearest integer to k*sin(sqrt(k)+j*Pi/2) where n = 3*k+j, 0<=j<3.
12

%I #17 Jun 20 2016 19:38:48

%S 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,

%T -9,-1,0,-10,0,-2,-11,2,-4,-11,4,-6,-12,6,-8,-12,8,-10,-11,10,-12,-10,

%U 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

%N a(n) = nearest integer to k*sin(sqrt(k)+j*Pi/2) where n = 3*k+j, 0<=j<3.

%H Chai Wah Wu, <a href="/A274097/b274097.txt">Table of n, a(n) for n = 0..10000</a>

%o (Python)

%o from sympy import sin, sqrt, pi

%o def f(n, t = 1):

%o k, j = divmod(n,t)

%o return int((k*sin(sqrt(k)+j*pi/2)).round())

%o A274097_list = [f(n,3) for n in range(10001)] # _Chai Wah Wu_, Jun 11 2016

%Y Sequences of the same type: A272695, A274086, A274087, A274088, A274090, A274091, A274092, A274095, A274096, A274097, A274101, A274102.

%K sign

%O 0,7

%A _N. J. A. Sloane_, Jun 11 2016