%I #17 Jan 15 2020 00:39:21
%S 0,1,1,1,2,1,1,2,2,1,2,3,3,3,2,2,4,4,4,4,2,2,4,5,5,5,4,2,3,5,6,7,7,6,
%T 5,3,3,6,7,8,9,8,7,6,3,3,6,8,9,10,10,9,8,6,3,4,7,9,11,12,12,12,11,9,7,
%U 4,4,8,10,12,14,14,14,14,12,10,8,4,4,8,11,13,15,16,16,16,15,13,11,8,4,5,9
%N Rectangular array read by antidiagonals: label each unit square in the first quadrant lattice by its northeast vertex (x,y) and mark squares for which x + y == 0 (mod 3); then R(m,n) is the number of unmarked squares in the rectangle [0,m] X [0,n].
%C Row 3n is given by n*(1,2,3,4,5,6,...).
%H G. C. Greubel, <a href="/A144001/b144001.txt">Table of n, a(n) for the first 50 rows, flattened</a>
%F R(m,n) = m*n - floor((2*m*n + 1)/3) if n ==1 (mod 3) and m*n - floor(2*m*n/3) otherwise.
%p A[oid] := proc(n,k) ## n = 0 .. infinity and k = 0 .. n
%p if 1 = (n-k+1) mod 3 then
%p (n-k+1)*(k+1) - floor((2*(n-k+1)*(k+1) + 1)/3)
%p else
%p (n-k+1)*(k+1) - floor(2*(n-k+1)*(k+1)/3)
%p end if
%p end proc: # _Yu-Sheng Chang_, Jan 07 2020
%t b[n_, m_]:= If[Mod[n, 3] == 1, m*n - Floor[(2*m*n + 1)/3], m*n - Floor[2*m*n/3]]; TableForm[Table[b[n, m], {n, 1, 6}, {m, 1, 6}]]
%t a:= Table[a[n, m], {n, 1, 25}, {m, 1, 25}]; Table[a[[k, n - k + 1]], {n, 1, 20}, {k, 1, n}]//Flatten (* _G. C. Greubel_, Dec 05 2017 *)
%Y Cf. A143996, A143997, A143998, A144399, A144000.
%K nonn,tabl
%O 1,5
%A _Clark Kimberling_, Sep 07 2008