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.

Showing 1-4 of 4 results.

A000493 a(n) = floor(sin(n)).

Original entry on oeis.org

0, 0, 0, 0, -1, -1, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0, 0, -1, -1, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0, -1, -1, -1, 0, 0
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A032615, A126564 (even bisection), A000480 (floor cos(n)).

Programs

  • Magma
    [Floor(Sin(n)): n in [0..100]]; // Vincenzo Librandi, Jun 15 2015
  • Maple
    f := n->floor(evalf(sin(n)));
  • Mathematica
    f[ n_ ] := Floor[ N[ Sin[ n ] ] ]
    Floor[Sin[Range[0,90]]] (* Harvey P. Dale, Dec 04 2012 *)

Formula

a(n) = -(A032615(n) mod 2). - Robert Israel, Jun 14 2015

A126565 a(n) = ceiling(sin(n)*cos(n)).

Original entry on oeis.org

0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1
Offset: 0

Views

Author

Rick L. Shepherd, Dec 27 2006

Keywords

Comments

For all nonzero integers n, ceiling(sin(n)*cos(n)) = 1 + floor(sin(n)*cos(n)), so a(n) = 1 + A126564(n) for n > 0 (a(0) = A126564(0) = 0).

Crossrefs

Cf. A126564.

Programs

  • PARI
    a(n) = ceil(sin(n)*cos(n))

Formula

a(n) = ceiling(sin(n)*cos(n)).

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

A372456 a(n) = 1 if abs(tan(n)) > 1, 0 otherwise.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1
Offset: 1

Views

Author

Ahmad J. Masad, May 01 2024

Keywords

Examples

			For n = 43, tan(43) = -1.498387339..., and abs(-1.498387339...) > 1, so a(43) = 1.
		

Crossrefs

Programs

  • Mathematica
    Table[Boole[Abs[Tan[n]] > 1], {n, 1, 100}] (* Amiram Eldar, May 02 2024 *)
  • PARI
    a(n) = abs(tan(n)) > 1; \\ Michel Marcus, May 01 2024
Showing 1-4 of 4 results.