OFFSET
1,5
COMMENTS
Row 3n is given by n*(1,2,3,4,5,6,...).
LINKS
G. C. Greubel, Table of n, a(n) for the first 50 rows, flattened
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