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-9 of 9 results.

A022844 a(n) = floor(n*Pi).

Original entry on oeis.org

0, 3, 6, 9, 12, 15, 18, 21, 25, 28, 31, 34, 37, 40, 43, 47, 50, 53, 56, 59, 62, 65, 69, 72, 75, 78, 81, 84, 87, 91, 94, 97, 100, 103, 106, 109, 113, 116, 119, 122, 125, 128, 131, 135, 138, 141, 144, 147, 150, 153, 157, 160, 163, 166, 169, 172, 175, 179, 182, 185, 188, 191, 194
Offset: 0

Views

Author

Keywords

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

Examples

			a(7)=21 because 7*Pi=21.9911... and a(8)=25 because 8*Pi=25.1327.... a(100000)=314159 because Pi=3.141592...
		

Crossrefs

First differences give A063438.

Programs

  • Magma
    R:=RieldField(10); [Floor(n*Pi(R)): n in [0..80]]; // G. C. Greubel, Sep 28 2018
  • 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 *)
  • PARI
    vector(80, n, n--; floor(n*Pi)) \\ G. C. Greubel, Sep 28 2018
    

Formula

a(n)/n converges to Pi because |a(n)/n - Pi| = |a(n) - n*Pi|/n < 1/n. - Hieronymus Fischer, Jan 22 2006

Extensions

Previous Mathematica program replaced by Harvey P. Dale, Aug 27 2024

A038130 Beatty sequence for 2*Pi.

Original entry on oeis.org

0, 6, 12, 18, 25, 31, 37, 43, 50, 56, 62, 69, 75, 81, 87, 94, 100, 106, 113, 119, 125, 131, 138, 144, 150, 157, 163, 169, 175, 182, 188, 194, 201, 207, 213, 219, 226, 232, 238, 245, 251, 257, 263, 270, 276, 282, 289, 295, 301, 307, 314, 320, 326, 333, 339, 345
Offset: 0

Views

Author

Keywords

Comments

a(n) = floor[circumference of a circle of radius n]. - Mohammad K. Azarian, Feb 29 2008
This sequence consists of the nonnegative integers k satisfying sin(k) <= 0 and sin(k+1) >= 0; thus this sequence and A246388 partition A022844 (the Beatty sequence for Pi). - Clark Kimberling, Aug 24 2014

Crossrefs

Complement of A108586.
For ceiling (2*Pi*n) see A004082.

Programs

  • Mathematica
    Table[Floor[2 n*Pi], {n, 0, 100}] (* or *)
    Select[Range[0, 628], Sin[#] <= 0 && Sin[# + 1] >= 0 &] (* Clark Kimberling, Aug 24 2014 *)

Formula

a(n) = floor(2*Pi*n).
a(n) = A004082(n+1) - 1. - John W. Nicholson, Mar 20 2025

Extensions

More terms from Mohammad K. Azarian, Feb 29 2008

A108586 Floor(2*n*Pi/(2*Pi-1)).

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 82, 83, 84, 85
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 11 2005

Keywords

Comments

Beatty sequence for 2*Pi/(2*Pi-1); complement of A038130; not the same as A108120: a(37)=44 <> A108120(37)=43.

Crossrefs

Programs

  • Mathematica
    With[{c=2Pi},Floor[(c*Range[80])/(c-1)]] (* Harvey P. Dale, Apr 21 2024 *)

A108589 a(n) = floor(n*Pi/(Pi-2)).

Original entry on oeis.org

2, 5, 8, 11, 13, 16, 19, 22, 24, 27, 30, 33, 35, 38, 41, 44, 46, 49, 52, 55, 57, 60, 63, 66, 68, 71, 74, 77, 79, 82, 85, 88, 90, 93, 96, 99, 101, 104, 107, 110, 112, 115, 118, 121, 123, 126, 129, 132, 134, 137, 140, 143, 145, 148, 151, 154, 156, 159, 162, 165, 167
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 11 2005

Keywords

Comments

Beatty sequence for Pi/(Pi-2); complement of A140758.

Crossrefs

Programs

  • Magma
    R:= RealField(40); [Floor(n*Pi(R)/(Pi(R)-2)): n in [1..60]]; // G. C. Greubel, Oct 21 2023
    
  • Maple
    A108589:=n->floor(n*Pi/(Pi-2)); seq(A108589(n), n=1..50); # Wesley Ivan Hurt, Apr 19 2014
  • Mathematica
    With[{c=Pi/(Pi-2)},Floor[c*Range[70]]] (* Harvey P. Dale, Apr 19 2014 *)
  • SageMath
    [floor(n*pi/(pi-2)) for n in range(1,61)] # G. C. Greubel, Oct 21 2023

A108590 Self-inverse integer permutation induced by Beatty sequences for Pi/2 and Pi/(Pi-2).

Original entry on oeis.org

2, 1, 5, 8, 3, 11, 13, 4, 16, 19, 6, 22, 7, 24, 27, 9, 30, 33, 10, 35, 38, 12, 41, 14, 44, 46, 15, 49, 52, 17, 55, 57, 18, 60, 20, 63, 66, 21, 68, 71, 23, 74, 77, 25, 79, 26, 82, 85, 28, 88, 90, 29, 93, 96, 31, 99, 32, 101, 104, 34, 107, 110, 36, 112, 115, 37, 118, 39, 121
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 11 2005

Keywords

Crossrefs

Formula

a(A140758(n))=A108589(n) and a(A108589(n))=A140758(n).

A189515 a(n) = n + [ns] + [nt]; s=Pi/2, t=2/Pi.

Original entry on oeis.org

2, 6, 8, 12, 15, 18, 21, 25, 28, 31, 35, 37, 41, 43, 47, 51, 53, 57, 60, 63, 66, 70, 73, 76, 79, 82, 86, 88, 92, 96, 98, 102, 105, 108, 111, 114, 118, 121, 124, 127, 131, 133, 137, 141, 143, 147, 149, 153, 156, 159, 163, 166, 169, 172, 176, 178, 182, 185, 188, 192, 194, 198, 201, 204, 208, 211, 214, 217, 220, 223, 227, 230, 233, 237, 239, 243, 246, 249, 253, 255, 259, 262, 265
Offset: 1

Views

Author

Clark Kimberling, Apr 23 2011

Keywords

Comments

This is one of three sequences that partition the positive integers. In general, suppose that r, s, t are positive real numbers for which the sets {i/r: i>=1}, {j/s: j>=1}, {k/t: k>=1} are pairwise disjoint. Let a(n) be the rank of n/r when all the numbers in the three sets are jointly ranked. Define b(n) and c(n) as the ranks of n/s and n/t. It is easy to prove that
a(n) = n + [ns/r] + [nt/r],
b(n) = n + [nr/s] + [nt/s],
c(n) = n + [nr/t] + [ns/t], where []=floor.
Taking r=1, s=Pi/2, t=2/Pi gives a=A189515, b=A189516, c=A189517.

Crossrefs

Programs

  • Mathematica
    r=1; s=Pi/2; t=2/Pi;
    a[n_] := n + Floor[n*s/r] + Floor[n*t/r];
    b[n_] := n + Floor[n*r/s] + Floor[n*t/s];
    c[n_] := n + Floor[n*r/t] + Floor[n*s/t];
    Table[a[n], {n, 1, 120}]  (*A189515*)
    Table[b[n], {n, 1, 120}]  (*A189516*)
    Table[c[n], {n, 1, 120}]  (*A189517*)

Formula

a(n) = n + A140758(n) + floor(2*n/Pi). - R. J. Mathar, Sep 30 2011

A372610 Decimal expansion of Sum_{k >= 1} floor((Pi/2)*k)/2^k.

Original entry on oeis.org

2, 6, 6, 9, 2, 9, 1, 3, 3, 8, 5, 8, 2, 6, 7, 7, 1, 6, 5, 3, 5, 4, 3, 3, 0, 7, 0, 8, 6, 6, 1, 4, 1, 7, 3, 2, 2, 8, 3, 4, 6, 4, 5, 6, 6, 9, 2, 9, 1, 3, 3, 8, 5, 8, 2, 6, 7, 7, 1, 6, 5, 3, 5, 4, 3, 3, 0, 6, 9, 9, 3, 1, 5, 3, 8, 6, 0, 7, 7, 0, 0, 8, 0, 7, 2, 0, 9, 8, 9, 4
Offset: 1

Views

Author

Paolo Xausa, May 07 2024

Keywords

Examples

			2.669291338582677165354330708661417322834645669291338582677...
		

Crossrefs

Programs

  • Mathematica
    First[RealDigits[Sum[Floor[Pi*k/2]/2^k, {k, 400}], 10, 100]]

Formula

Approximately 339/127, correct to 67 digits: see Example 4.1 (a) in Borwein and Borwein (1992), p. 633.

A292987 Beatty sequence of the real root of x^5 - x^4 - x^2 - 1; complement of A292988.

Original entry on oeis.org

1, 3, 4, 6, 7, 9, 10, 12, 14, 15, 17, 18, 20, 21, 23, 25, 26, 28, 29, 31, 32, 34, 36, 37, 39, 40, 42, 43, 45, 47, 48, 50, 51, 53, 54, 56, 58, 59, 61, 62, 64, 65, 67, 69, 70, 72, 73, 75, 76, 78, 80, 81, 83, 84, 86, 87, 89, 91, 92, 94, 95, 97, 98, 100, 102, 103, 105, 106, 108, 109, 111, 113, 114, 116, 117, 119, 120, 122, 124, 125, 127, 128, 130, 131, 133, 135, 136, 138, 139, 141, 142, 144, 146, 147, 149, 150, 152, 153, 155, 157, 158, 160, 161, 163, 164, 166, 168, 169, 171, 172, 174, 175, 177, 178
Offset: 1

Views

Author

Iain Fox, Dec 08 2017

Keywords

Comments

First differs from A187342 at n = 37.
First differs from A140758 at n = 114.

Examples

			a(2) = floor(2 * 1.5701...) = floor(3.1402...) = 3.
		

Crossrefs

Complement: A292988.

Programs

  • Mathematica
    r = N[Root[#^5 - #^4 - #^2 - 1 &, 1], 64]; Array[ Floor[r #] &, 70] (* Robert G. Wilson v, Dec 10 2017 *)
  • PARI
    a(n) = floor(n*solve(x=1, 2, x^5 - x^4 - x^2 - 1))

Formula

a(n) = floor(n * r), where r = 1.57014731219605436291... (see A293506).

A132222 Beatty sequence 1+2*floor(n*Pi/2), which contains infinitely many primes.

Original entry on oeis.org

1, 3, 7, 9, 13, 15, 19, 21, 25, 29, 31, 35, 37, 41, 43, 47, 51, 53, 57, 59, 63, 65, 69, 73, 75, 79, 81, 85, 87, 91, 95, 97, 101, 103, 107, 109, 113, 117, 119, 123, 125, 129, 131, 135, 139, 141, 145, 147, 151, 153, 157, 161, 163, 167, 169, 173, 175, 179, 183, 185, 189
Offset: 0

Views

Author

Jonathan Vos Post, Aug 14 2007

Keywords

Comments

The primes in this entirely odd sequence begin 3, 7, 13, 19, 29, 31, 37, 41, 43, 47, 53, 59, 73, 79, 97, 101. By the theorems in Banks, there are an infinite number of primes in this sequence.

Examples

			a(0) = 1 because 1 + 2*floor(0*Pi) = 1 + 2*0 = 1 + 0 = 1.
a(1) = 3 because 1 + 2*floor(1*Pi/2) = 1 + 2*floor(1.5707963) = 1 + 2*1 = 3.
a(2) = 7 because 1 + 2*floor(2*Pi/2) = 1 + 2*floor(3.1415926) = 1 + 2*3 = 7.
a(3) = 9 because 1 + 2*floor(3*Pi/2) = 1 + 2*floor(4.7123889) = 1 + 2*4 = 9.
a(4) = 13 because 1 + 2*floor(4*Pi/2) = 1 + 2*floor(6.2831853) = 1 + 2*6 = 13.
a(5) = 15 because 1 + 2*floor(5*Pi/2) = 1 + 2*floor(7.8539816) = 1 + 2*7 = 15.
a(7) = 21 because 1 + 2*floor(7*Pi/2) = 1 + 2*floor(10.995574) = 1 + 2*10 = 21.
		

Crossrefs

Programs

Formula

a(n) = 1 + 2*floor(n*Pi/2).
a(n) = 1 + 2*A140758(n). - L. Edson Jeffery, Mar 16 2013

Extensions

More terms from Stefan Steinerberger, Sep 02 2007
Showing 1-9 of 9 results.