OFFSET
1,4
FORMULA
a(n) = Sum_{i=4..n} i * (2*n-i) * (1 - c(i)) * (1 - c(2*n-i)), where c is the prime characteristic (A010051).
EXAMPLE
a(5) = 24; 2*5 = 10 has one rectangle with composite side lengths, 6 X 4 with area 24.
a(6) = 68; 2*6 = 12 has two rectangles with composite side lengths, 8 X 4 and 6 X 6, with total area 8*4 + 6*6 = 32 + 36 = 68.
MATHEMATICA
Table[Sum[i (2 n - i) (1 - PrimePi[i] + PrimePi[i - 1]) (1 - PrimePi[2 n - i] + PrimePi[2 n - i - 1]), {i, 4, n}], {n, 50}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Apr 19 2020
STATUS
approved