Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #24 Apr 06 2021 20:15:56
%S -1,0,1,1,-1,-2,-2,-1,1,1,0,-2,-2,-1,0,1,0,-1,-2,-1,0,1,0,-1,-2,-2,0,
%T 1,1,0,-2,-2,-1,1,1,0,-1,-2,-1,0,1,0,-1,-2,-1,0,1,1,-1,-2,-2,-1,1,1,0,
%U -2,-2,-1,0,1,0,-1,-2,-1,0,1,0,-1,-2,-2,0,1,1,0,-2,-2,-1,1,1,0,-1,-2,-1,0
%N a(n) = floor(sin(n) - cos(n)).
%H G. C. Greubel, <a href="/A181059/b181059.txt">Table of n, a(n) for n = 0..500</a>
%F a(n) = floor( -sqrt(2)*cos(n + Pi/4) ). - _R. J. Mathar_, Oct 03 2010
%p A181059 := proc(n) -sqrt(2)*cos(n+Pi/4) ; floor(%) ; end proc: seq(A181059(n), n=0..120) ; # _R. J. Mathar_, Oct 03 2010
%t Table[Floor[Sin[n]-Cos[n]],{n,0,120}] (* _Harvey P. Dale_, Jun 01 2018 *)
%o (Magma) [Floor(Sin(n) - Cos(n)): n in [0..120]]; // _G. C. Greubel_, Apr 05 2021
%o (Sage) [floor(-sqrt(2)*cos(n+pi/4)) for n in (0..120)] # _G. C. Greubel_, Apr 05 2021
%Y Cf. A126564 (floor sin(n)*cos(n)).
%K sign,easy
%O 0,6
%A _Jonathan D. B. Hodgson_, Oct 01 2010
%E More terms from _R. J. Mathar_, Oct 03 2010