login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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

%I #14 Jul 29 2023 06:42:46

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

%T -12,-8,-12,-10,-11,-12,-10,-14,-9,-16,-8,-18,-7,-19,-5,-21,-3,-22,0,

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

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

%H Chai Wah Wu, <a href="/A274096/b274096.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 A274096_list = [f(n,2) 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,5

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