# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a286655 Showing 1-1 of 1 %I A286655 #8 Sep 01 2022 19:47:57 %S A286655 0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,1,0, %T A286655 0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,1,0, %U A286655 0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,0 %N A286655 Characteristic sequence of the Beatty sequence, A022842, of sqrt(8). %C A286655 The positions of 0 are given by A286323, and of 1, by A022842. %H A286655 Clark Kimberling, Table of n, a(n) for n = 1..10000 %F A286655 a(n) = 1 - floor((n+1)*(1-1/r)) + floor(n*(1-1/r)), where r = sqrt(8). [corrected by _Georg Fischer_, Sep 01 2022] %t A286655 r = Sqrt[8]; %t A286655 s = 1 - Table[Floor[(n + 1) (1 - 1/r) - Floor[n (1 - 1/r)]], {n, 1, 200}] (* A286655 *) %t A286655 Flatten[Position[s, 0]] (* A286323 *) %t A286655 Flatten[Position[s, 1]] (* A022842 *) %Y A286655 Cf. A022842, A286323. %K A286655 nonn,easy %O A286655 1 %A A286655 _Clark Kimberling_, May 11 2017 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE