OFFSET
1,3
FORMULA
a(n) = round(2 * Sum_{i=1..floor((n-1)/2)} sqrt(i^2 + (n-i)^2)).
EXAMPLE
a(4) = 6; There is only one 1 X 3 rectangle (there is no 2 X 2 rectangle since W < L) and sqrt(1^2 + 3^2) = sqrt(10). Since there are two diagonals in a rectangle, the total length is 2*sqrt(10). Then we have round(2*sqrt(10)) = round(6.32455532..) = 6.
MATHEMATICA
Table[Round[2*Sum[Sqrt[i^2 + (n - i)^2], {i, Floor[(n-1)/2]}]], {n, 80}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Oct 30 2017
STATUS
approved