cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A144000 Rectangular array 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 marked squares in the rectangle [0,m]x[0,n].

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 4, 4, 3, 3, 5, 6, 5, 3, 4, 6, 8, 8, 6, 4, 5, 8, 10, 11, 10, 8, 5, 5, 9, 12, 13, 13, 12, 9, 5, 6, 10, 14, 16, 16, 16, 14, 10, 6, 7, 12, 16, 19, 20, 20, 19, 16, 12, 7, 7, 13, 18, 21, 23, 24, 23, 21, 18, 13, 7, 8, 14, 20, 24, 26, 28, 28, 26, 24, 20, 14, 8, 9, 16, 22, 27, 30
Offset: 1

Views

Author

Clark Kimberling, Sep 07 2008

Keywords

Comments

Row 3n is given by 2n*(1,2,3,4,5,6,...).

Crossrefs

Programs

  • Maple
    A := proc(n,k) ## n = 0 .. infinity and k = 0 .. n
        if  1 = (n-k+1) mod 3 then
            floor((2*(k+1)*(n-k+1)+1) / 3)
        else
            floor((2*(k+1)*(n-k+1)) / 3)
        end if
    end proc: # Yu-Sheng Chang, Jan 01 2020
  • Mathematica
    b[n_, m_] := If[Mod[n, 3] == 1, Floor[(2*m*n + 1)/3],  Floor[2*m*n/3]]; 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 *)

Formula

R(m,n) = floor((2*m*n + 1)/3) if n == 1 (mod 3) and floor(2*m*n/3) otherwise.