OFFSET
1,5
FORMULA
a(n) = Sum_{k=1..floor((n-1)/2)} k*(n-k)*c(k), where c is the prime characteristic (A010051).
EXAMPLE
a(7) = 22; The two rectangles are 2 X 5 and 3 X 4. The total area is then 2*5 + 3*4 = 10 + 12 = 22.
a(10) = 37; The two rectangles are 2 X 8 and 3 X 7 (we don't count 5 X 5 since p < r). The total area is then 2*8 + 3*7 = 16 + 21 = 37.
MATHEMATICA
Table[Sum[i*(n - i) (PrimePi[i] - PrimePi[i - 1]), {i, Floor[(n - 1)/2]}], {n, 60}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Apr 27 2021
STATUS
approved