login
A274091
Take alternate terms of A274088 and A274090.
12
0, 0, 1, 1, 4, 1, 9, -1, 15, -7, 20, -15, 23, -28, 23, -43, 20, -61, 11, -80, -2, -100, -21, -119, -46, -137, -76, -151, -111, -162, -150, -167, -194, -167, -240, -161, -289, -147, -339, -125, -389, -95, -437, -57, -484, -11, -527, 44, -566, 107, -599, 177, -626, 255, -645, 339, -656, 429, -658, 524
OFFSET
0,5
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:
f:=n->round(evalf(n^2*sin(sqrt(n)))); # A274088
fc:=n->round(evalf(n^2*cos(sqrt(n)))); # A274090
fu:=n->if n mod 2 = 0 then f(n/2) else fc((n-1)/2); fi;
[seq(fu(n), n=0..120)];
PROG
(Python)
from sympy import sin, sqrt, pi
def f(n, t = 1):
k, j = divmod(n, t)
return int((k**2*sin(sqrt(k)+j*pi/2)).round())
A274091_list = [f(n, 2) for n in range(10001)] # Chai Wah Wu, Jun 11 2016
CROSSREFS
See A274092 for a three-strand version.
Sequence in context: A323600 A336851 A138675 * A080103 A091419 A326582
KEYWORD
sign
AUTHOR
N. J. A. Sloane, Jun 10 2016
STATUS
approved