login
The squares on a chessboard that are white, counting from top left corner and down.
1

%I #20 Aug 18 2013 00:08:19

%S 1,3,5,7,10,12,14,16,17,19,21,23,26,28,30,32,33,35,37,39,42,44,46,48,

%T 49,51,53,55,58,60,62,64

%N The squares on a chessboard that are white, counting from top left corner and down.

%C Equivalently it represents the squares that are black, counting from bottom left corner and up.

%F a(1) = 1, a(n) = a(n-1) + 2 + (mod(a(n-1)+1, 8) == 0) - (mod(a(n-1), 8) == 0).

%F To check if n is white: mod(s, 2) + (1 - 2*mod(s, 2)) * mod(floor((s-1)/8), 2).

%t sqColor[n_] := Mod[n, 2] + (1 - 2*Mod[n, 2])*Mod[Floor[(n - 1)/8], 2]; Select[Range[64], sqColor[#] == 1 &]

%Y Cf. A225773 (black-squares sequence).

%K nonn,fini,full,easy

%O 1,2

%A _Jonas Hallgren_, Jul 25 2013