[go: up one dir, main page]

login
Search: a054386 -id:a054386
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) = floor(n*Pi).
+10
43
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,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
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
First differences give A063438.
KEYWORD
nonn
EXTENSIONS
Previous Mathematica program replaced by Harvey P. Dale, Aug 27 2024
STATUS
approved
Self-inverse integer permutation induced by Beatty sequences for Pi and Pi/(Pi-1).
+10
7
3, 6, 1, 9, 12, 2, 15, 18, 4, 21, 25, 5, 28, 31, 7, 34, 37, 8, 40, 43, 10, 47, 50, 53, 11, 56, 59, 13, 62, 65, 14, 69, 72, 16, 75, 78, 17, 81, 84, 19, 87, 91, 20, 94, 97, 100, 22, 103, 106, 23, 109, 113, 24, 116, 119, 26, 122, 125, 27, 128, 131, 29, 135, 138, 30, 141, 144
OFFSET
1,1
FORMULA
a(A022844(n))=A054386(n) and a(A054386(n))=A022844(n).
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Jun 11 2005
EXTENSIONS
a(53)/a(54) joined by Georg Fischer, May 24 2022
STATUS
approved
Floor(2*n*Pi/(2*Pi-1)).
+10
5
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,2
COMMENTS
Beatty sequence for 2*Pi/(2*Pi-1); complement of A038130; not the same as A108120: a(37)=44 <> A108120(37)=43.
MATHEMATICA
With[{c=2Pi}, Floor[(c*Range[80])/(c-1)]] (* Harvey P. Dale, Apr 21 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jun 11 2005
STATUS
approved
a(n) = floor(n*Pi/(Pi-2)).
+10
5
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,1
COMMENTS
Beatty sequence for Pi/(Pi-2); complement of A140758.
LINKS
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 *)
PROG
(Magma) R:= RealField(40); [Floor(n*Pi(R)/(Pi(R)-2)): n in [1..60]]; // G. C. Greubel, Oct 21 2023
(SageMath) [floor(n*pi/(pi-2)) for n in range(1, 61)] # G. C. Greubel, Oct 21 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Jun 11 2005
STATUS
approved
Nonnegative integers k satisfying sin(k) >= 0 and sin(k+1) <= 0.
+10
5
3, 9, 15, 21, 28, 34, 40, 47, 53, 59, 65, 72, 78, 84, 91, 97, 103, 109, 116, 122, 128, 135, 141, 147, 153, 160, 166, 172, 179, 185, 191, 197, 204, 210, 216, 223, 229, 235, 241, 248, 254, 260, 267, 273, 279, 285, 292, 298, 304, 311, 317, 323, 329, 336, 342
OFFSET
0,1
COMMENTS
A246388 and A038130 (Beatty sequence for 2*Pi) partition A022844 (Beatty sequence for Pi). Likewise, A054386, the complement of A022844, is partitioned by A246389 and A246390. (See the Mathematica program.)
LINKS
MATHEMATICA
z = 400; f[x_] := Sin[x]
Select[Range[0, z], f[#]*f[# + 1] <= 0 &] (* A022844 *)
Select[Range[0, z], f[#] >= 0 && f[# + 1] <= 0 &] (* A246388 *)
Select[Range[0, z], f[#] <= 0 && f[# + 1] >= 0 &] (* A038130 *)
Select[Range[0, z], f[#]*f[# + 1] > 0 &] (* A054386 *)
Select[Range[0, z], f[#] >= 0 && f[# + 1] >= 0 &] (* A246389 *)
Select[Range[0, z], f[#] <= 0 && f[# + 1] <= 0 &] (* A246390 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Aug 24 2014
STATUS
approved
a(1) = floor(Pi) = 3; a(n+1) = floor(a(n)*Pi).
+10
4
3, 9, 28, 87, 273, 857, 2692, 8457, 26568, 83465, 262213, 823766, 2587937, 8130243, 25541911, 80242279, 252088554, 791959549, 2488014301, 7816327450, 24555716894, 77144059797, 242355211526, 761381352089, 2391950062303
OFFSET
1,1
COMMENTS
a(n+1)/a(n) converges to Pi. Similar to sequence A085839 but with a simpler definition.
Subset of the Beatty sequence of Pi = A022844 = floor(n*Pi). Primes in this sequence include a(1) = 3, a(6) = 857, a(15) = 25541911. - Jonathan Vos Post, Jan 18 2006
LINKS
Eric Weisstein's World of Mathematics, Beatty Sequence.
EXAMPLE
a(2) = floor(a(1)*Pi) = floor(3*Pi) = 9;
a(3) = floor(a(2)*Pi) = floor(9*Pi) = 28;
a(4) = floor(a(3)*Pi) = floor(28*Pi) = 87.
MAPLE
A[1]:= 3:
for n from 2 to 50 do A[n]:= floor(Pi*A[n-1]) od:
seq(A[i], i=1..50); # Robert Israel, Feb 07 2016
MATHEMATICA
a[1] = Floor[Pi]; a[n_] := a[n] = Floor[a[n - 1]*Pi]; Array[a, 25] (* Robert G. Wilson v, Jan 18 2006 *)
NestList[Floor[Pi #]&, 3, 30] (* Harvey P. Dale, Mar 30 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Hieronymus Fischer, Jan 17 2006
EXTENSIONS
More terms from Robert G. Wilson v, Jan 18 2006
STATUS
approved
Nonnegative integers k satisfying sin(k) >= 0 and sin(k+1) >= 0.
+10
4
0, 1, 2, 7, 8, 13, 14, 19, 20, 26, 27, 32, 33, 38, 39, 44, 45, 46, 51, 52, 57, 58, 63, 64, 70, 71, 76, 77, 82, 83, 88, 89, 90, 95, 96, 101, 102, 107, 108, 114, 115, 120, 121, 126, 127, 132, 133, 134, 139, 140, 145, 146, 151, 152, 158, 159, 164, 165, 170, 171
OFFSET
0,3
COMMENTS
A246388 and A038130 (Beatty sequence for 2*Pi) partition A022844 (Beatty sequence for Pi). Likewise, A054386, the complement of A022844, is partitioned by A246389 and A246390. (See the Mathematica program.)
LINKS
MAPLE
Digits := 100:
isA246389 := proc(k)
if evalf(sin(k)) >= 0 and evalf(sin(k+1)) >= 0 then
return true ;
else
return false ;
end if;
end proc:
A246389 := proc(n)
option remember ;
if n = 1 then
0;
else
for a from procname(n-1)+1 do
if isA246389(a) then
return a;
end if;
end do:
end if;
end proc:
seq(A246389(n), n=1..100) ; # assumes offset 1 R. J. Mathar, Jan 18 2024
MATHEMATICA
z = 400; f[x_] := Sin[x]
Select[Range[0, z], f[#]*f[# + 1] <= 0 &] (* A022844 *)
Select[Range[0, z], f[#] >= 0 && f[# + 1] <= 0 &] (* A246388 *)
Select[Range[0, z], f[#] <= 0 && f[# + 1] >= 0 &] (* A038130 *)
Select[Range[0, z], f[#]*f[# + 1] > 0 &] (* A054386 *)
Select[Range[0, z], f[#] >= 0 && f[# + 1] >= 0 &] (* A246389 *)
Select[Range[0, z], f[#] <= 0 && f[# + 1] <= 0 &] (* A246390 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Aug 24 2014
STATUS
approved
Beatty sequence for 1/(e^Pi - Pi^e), complement of A127451.
+10
3
1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 24, 26, 27, 29, 30, 32, 33, 35, 36, 38, 39, 41, 42, 44, 45, 46, 48, 49, 51, 52, 54, 55, 57, 58, 60, 61, 63, 64, 66, 67, 68, 70, 71, 73, 74, 76, 77, 79, 80, 82, 83, 85, 86, 88, 89, 90, 92, 93, 95, 96, 98, 99, 101, 102
OFFSET
1,2
COMMENTS
Differs from A054386 at term n=122, where A054386(122)=178, A127450(122)=179. - Martin Fuller, May 10 2007
FORMULA
a(n) = floor(n/(e^Pi - Pi^e))
MATHEMATICA
Table[Floor[n/(Exp[Pi] - Pi^E)], {n, 70}]
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Robert G. Wilson v, Jan 14 2007
EXTENSIONS
Definition corrected by N. J. A. Sloane, May 10 2007
STATUS
approved
Nonnegative integers k satisfying sin(k) <= 0 and sin(k+1) <= 0.
+10
3
4, 5, 10, 11, 16, 17, 22, 23, 24, 29, 30, 35, 36, 41, 42, 48, 49, 54, 55, 60, 61, 66, 67, 68, 73, 74, 79, 80, 85, 86, 92, 93, 98, 99, 104, 105, 110, 111, 112, 117, 118, 123, 124, 129, 130, 136, 137, 142, 143, 148, 149, 154, 155, 156, 161, 162, 167, 168, 173
OFFSET
0,1
COMMENTS
A246388 and A038130 (Beatty sequence for 2*Pi) partition A022844 (Beatty sequence for Pi). Likewise, A054386, the complement of A022844, is partitioned by A246389 and A246390. (See the Mathematica program.)
LINKS
MATHEMATICA
z = 400; f[x_] := Sin[x]
Select[Range[0, z], f[#]*f[# + 1] <= 0 &] (* A022844 *)
Select[Range[0, z], f[#] >= 0 && f[# + 1] <= 0 &] (* A246388 *)
Select[Range[0, z], f[#] <= 0 && f[# + 1] >= 0 &] (* A038130 *)
Select[Range[0, z], f[#]*f[# + 1] > 0 &] (* A054386 *)
Select[Range[0, z], f[#] >= 0 && f[# + 1] >= 0 &] (* A246389 *)
Select[Range[0, z], f[#] <= 0 && f[# + 1] <= 0 &] (* A246390 *)
SequencePosition[Table[If[Sin[n]<=0, 1, 0], {n, 200}], {1, 1}][[;; , 1]] (* Harvey P. Dale, Apr 02 2023 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Aug 24 2014
STATUS
approved

Search completed in 0.019 seconds