cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A181059 a(n) = floor(sin(n) - cos(n)).

Original entry on oeis.org

-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, 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, -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
Offset: 0

Views

Author

Jonathan D. B. Hodgson, Oct 01 2010

Keywords

Crossrefs

Cf. A126564 (floor sin(n)*cos(n)).

Programs

  • Magma
    [Floor(Sin(n) - Cos(n)): n in [0..120]]; // G. C. Greubel, Apr 05 2021
    
  • Maple
    A181059 := proc(n) -sqrt(2)*cos(n+Pi/4) ; floor(%) ; end proc: seq(A181059(n), n=0..120) ; # R. J. Mathar, Oct 03 2010
  • Mathematica
    Table[Floor[Sin[n]-Cos[n]],{n,0,120}] (* Harvey P. Dale, Jun 01 2018 *)
  • Sage
    [floor(-sqrt(2)*cos(n+pi/4)) for n in (0..120)] # G. C. Greubel, Apr 05 2021

Formula

a(n) = floor( -sqrt(2)*cos(n + Pi/4) ). - R. J. Mathar, Oct 03 2010

Extensions

More terms from R. J. Mathar, Oct 03 2010