OFFSET
1,1
FORMULA
T(n, k) = (2k^3*n+6k^2*n+k^2+4k*n+2k-k^4-2k^3)/3.
EXAMPLE
T(3, 2) = 40 because the six 1 X 1 squares each have perimeter 4 and the two 2 X 2 squares each have perimeter 8.
CROSSREFS
KEYWORD
AUTHOR
Artemario Tadeu Medeiros da Silva (artemario(AT)uol.com.br), Jun 09 2003
EXTENSIONS
Edited by David Wasserman, Nov 18 2004
STATUS
approved