login
A144001
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].
6
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, 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, 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
OFFSET
1,5
COMMENTS
Row 3n is given by n*(1,2,3,4,5,6,...).
FORMULA
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.
MAPLE
A[oid] := proc(n, k) ## n = 0 .. infinity and k = 0 .. n
if 1 = (n-k+1) mod 3 then
(n-k+1)*(k+1) - floor((2*(n-k+1)*(k+1) + 1)/3)
else
(n-k+1)*(k+1) - floor(2*(n-k+1)*(k+1)/3)
end if
end proc: # Yu-Sheng Chang, Jan 07 2020
MATHEMATICA
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}]]
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 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Clark Kimberling, Sep 07 2008
STATUS
approved