OFFSET
0,2
COMMENTS
Beatty sequence for Pi.
Differs from A127451 first at a(57). - L. Edson Jeffery, Dec 01 2013
These are the nonnegative integers m satisfying sin(m)*sin(m+1) <= 0. In general, the Beatty sequence of an irrational number r > 1 consists of the numbers m satisfying sin(m*x)*sin((m+1)*x) <= 0, where x = Pi/r. Thus the numbers m satisfying sin(m*x)*sin((m+1)*x) > 0 form the Beatty sequence of r/(1-r). - Clark Kimberling, Aug 21 2014
This can also be stated in terms of the tangent function. These are the nonnegative integers m such that tan(m/2)*tan(m/2+1/2) <= 0. In general, the Beatty sequence of an irrational number r > 1 consists of the numbers m satisfying tan(m*x/2)*tan((m+1)*x/2) <= 0, where x = Pi/r. Thus the numbers m satisfying tan(m*x/2)*tan((m+1)*x/2) > 0 form the Beatty sequence of r/(1-r). - Clark Kimberling, Aug 22 2014
LINKS
Ivan Panchenko, Table of n, a(n) for n = 0..10000
Eric Weisstein's World of Mathematics, Beatty Sequence.
FORMULA
a(n)/n converges to Pi because |a(n)/n - Pi| = |a(n) - n*Pi|/n < 1/n. - Hieronymus Fischer, Jan 22 2006
EXAMPLE
a(7)=21 because 7*Pi=21.9911... and a(8)=25 because 8*Pi=25.1327.... a(100000)=314159 because Pi=3.141592...
MAPLE
a:=n->floor(n*Pi): seq(a(n), n=0..70); # Muniru A Asiru, Sep 28 2018
MATHEMATICA
Floor[Pi Range[0, 200]] (* Harvey P. Dale, Aug 27 2024 *)
PROG
(PARI) vector(80, n, n--; floor(n*Pi)) \\ G. C. Greubel, Sep 28 2018
(Magma) R:=RieldField(10); [Floor(n*Pi(R)): n in [0..80]]; // G. C. Greubel, Sep 28 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Previous Mathematica program replaced by Harvey P. Dale, Aug 27 2024
STATUS
approved