login
a(n) = 1 - (floor((n+1)*Pi) - floor(n*Pi)) mod 2.
3

%I #15 Apr 13 2024 12:42:20

%S 0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,

%T 0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,

%U 0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0

%N a(n) = 1 - (floor((n+1)*Pi) - floor(n*Pi)) mod 2.

%C The arithmetic mean 1/(n+1)*sum(a(k)|k=0...n) converges to Pi-3. What is effectively the same: the Cesaro limit (C1) of a(n) is Pi-3.

%F a(n) = 1 - (Floor((n+1)*Pi)-Floor(n*Pi)) mod 2.

%F a(n) = 1 - A115789(n). - _Michel Marcus_, Jul 15 2013

%e a(6)=0 because 7*Pi=21.99, 6*pi=18.85 and so a(6)=1-(21-18) mod 2 = 0;

%e a(7)=1 because 8*Pi=25.13 and so a(7)=1-(25-21) mod 2 = 1;

%t Mod[1-(Last[#]-First[#]),2]&/@(Partition[Floor[Pi #]&/@ Range[ 0,110],2,1]) (* _Harvey P. Dale_, Oct 12 2012 *)

%Y Cf. A000796, A022844, A063438, A115788, A115789.

%K nonn

%O 0,1

%A _Hieronymus Fischer_, Jan 31 2006