login
a(n) = [nr+kr]-[nr]-[kr], where r=sqrt(2), k=4, [ ]=floor.
4

%I #10 Sep 08 2022 08:45:56

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

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

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

%N a(n) = [nr+kr]-[nr]-[kr], where r=sqrt(2), k=4, [ ]=floor.

%C See A187950.

%H G. C. Greubel, <a href="/A187972/b187972.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = [(n+4)*r] - [n*r] - [4*r], where r=sqrt(2).

%t r=2^(1/2);

%t seqA=Table[Floor[(n+4)r]-Floor[n*r]-Floor[4r], {n,1,220}] (* A187972 *)

%t Flatten[Position[seqA,0] ] (* A187973 *)

%t Flatten[Position[seqA,1] ] (* A187974 *)

%o (PARI) for(n=1,30, print1(floor((n+4)*sqrt(2)) - floor(n*sqrt(2)) - floor(4*sqrt(2)), ", ")) \\ _G. C. Greubel_, Jan 31 2018

%o (Magma) [Floor((n+4)*Sqrt(2)) - Floor(n*Sqrt(2)) - Floor(4*Sqrt(2)): n in [1..30]]; // _G. C. Greubel_, Jan 31 2018

%Y Cf. A187950, A187973, A187974.

%K nonn

%O 1

%A _Clark Kimberling_, Mar 17 2011