login
a(n) = floor(n*Pi/2).
10

%I #16 Oct 21 2023 21:48:11

%S 0,1,3,4,6,7,9,10,12,14,15,17,18,20,21,23,25,26,28,29,31,32,34,36,37,

%T 39,40,42,43,45,47,48,50,51,53,54,56,58,59,61,62,64,65,67,69,70,72,73,

%U 75,76,78,80,81,83,84,86,87,89,91,92,94,95,97,98,100,102,103,105

%N a(n) = floor(n*Pi/2).

%C Beatty sequence for Pi/2; complement of A108589; not the same as A093610: a(23)=36 <> A093610(23)=35.

%H G. C. Greubel, <a href="/A140758/b140758.txt">Table of n, a(n) for n = 0..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/BeattySequence.html">Beatty Sequence</a>

%H <a href="/index/Be#Beatty">Index entries for sequences related to Beatty sequences</a>

%e For n = 5, 5*(Pi/2) approximately equals 7.854, and floor(7.854) = 7.

%t Floor[Pi*Range[0,80]/2] (* _G. C. Greubel_, Oct 21 2023 *)

%o (Python)

%o import math

%o x=0

%o while x < 36001:

%o y = math.radians(x)

%o z = math.trunc(y)

%o print(z, end=", ")

%o x += 90

%o # Mick Purcell (mickpurcell(AT)gmail.com), Oct 05 2009

%o (Magma) R:= RealField(40); [Floor(n*Pi(R)/2): n in [0..80]]; // _G. C. Greubel_, Oct 21 2023

%o (SageMath) [floor(n*pi/2) for n in range(81)] # _G. C. Greubel_, Oct 21 2023

%Y Cf. A022844, A038130, A108590.

%K nonn

%O 0,3

%A _Reinhard Zumkeller_, May 27 2008

%E 0 added by Mick Purcell (mickpurcell(AT)gmail.com), Oct 05 2009