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.

A271916 Array read by antidiagonals: T(m,n) (m>=1, n>=1) = f(m,n) if m <= n or f(n,m) if n < m, where f(m,n) = m*(m-1)*(3*n-m-1)/6.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 3, 5, 3, 0, 0, 4, 8, 8, 4, 0, 0, 5, 11, 14, 11, 5, 0, 0, 6, 14, 20, 20, 14, 6, 0, 0, 7, 17, 26, 30, 26, 17, 7, 0, 0, 8, 20, 32, 40, 40, 32, 20, 8, 0, 0, 9, 23, 38, 50, 55, 50, 38, 23, 9, 0, 0, 10, 26, 44, 60, 70, 70, 60, 44, 26, 10, 0
Offset: 1

Views

Author

N. J. A. Sloane, Apr 26 2016

Keywords

Comments

T(m,n) is the number of ways to choose four distinct points from an m X n rectangular grid that form a square aligned with the axes. See A271917 for the count of all subsquares.

Examples

			The array begins:
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...
0, 2, 5, 8, 11, 14, 17, 20, 23, 26, ...
0, 3, 8, 14, 20, 26, 32, 38, 44, 50, ...
0, 4, 11, 20, 30, 40, 50, 60, 70, 80, ...
0, 5, 14, 26, 40, 55, 70, 85, 100, 115, ...
0, 6, 17, 32, 50, 70, 91, 112, 133, 154, ...
0, 7, 20, 38, 60, 85, 112, 140, 168, 196, ...
0, 8, 23, 44, 70, 100, 133, 168, 204, 240, ...
0, 9, 26, 50, 80, 115, 154, 196, 240, 285, ...
...
As a triangle:
0,
0, 0,
0, 1, 0,
0, 2, 2, 0,
0, 3, 5, 3, 0,
0, 4, 8, 8, 4, 0,
0, 5, 11, 14, 11, 5, 0,
0, 6, 14, 20, 20, 14, 6, 0,
0, 7, 17, 26, 30, 26, 17, 7, 0,
0, 8, 20, 32, 40, 40, 32, 20, 8, 0,
...
		

Crossrefs

See A115262 for another version.
Main diagonal is A000330 (shifted).

Programs

  • Maple
    f1:=(m,n)->(1/6)*m*(m-1)*(3*n-m-1);
    f2:=(m,n)->if n>=m then f1(m,n) else f1(n,m) fi;
    for m from 1 to 10 do
    lprint([seq(f2(m,n),n=1..10)]); od;