[go: up one dir, main page]

login
A274092
a(n) = nearest integer to k^2*sin(sqrt(k)+j*Pi/2) where n = 3*k+j, 0<=j<3.
12
0, 0, 0, 1, 1, -1, 4, 1, -4, 9, -1, -9, 15, -7, -15, 20, -15, -20, 23, -28, -23, 23, -43, -23, 20, -61, -20, 11, -80, -11, -2, -100, 2, -21, -119, 21, -46, -137, 46, -76, -151, 76, -111, -162, 111, -150, -167, 150, -194, -167, 194, -240, -161, 240, -289, -147, 289, -339, -125, 339, -389, -95, 389
OFFSET
0,7
LINKS
N. J. A. Sloane and Chai Wah Wu, Table of n, a(n) for n = 0..10000 n = 0..1000 from N. J. A. Sloane
MAPLE
Digits:=50:
ft:=proc(n, t) local k, j;
j:=(n mod t); k:=(n-j)/t;
round(evalf(k^2*sin(sqrt(k)+j*Pi/2)));
end;
[seq(ft(n, 3), n=0..120)];
PROG
(Python)
from sympy import sin, sqrt, pi
def A274092(n):
k, j = divmod(n, 3)
return int((k**2*sin(sqrt(k)+j*pi/2)).round()) # Chai Wah Wu, Jun 10 2016
CROSSREFS
KEYWORD
sign
AUTHOR
N. J. A. Sloane, Jun 10 2016
STATUS
approved