OFFSET
1,6
FORMULA
a(n) = Sum_{i=4..n} (1 - ceiling((2*n-i)/i) + floor((2*n-i)/i)) * (1 - c(i)) * (1 - c(2*n-i)), where c is the prime characteristic (A010051).
EXAMPLE
a(6) = 2; 2*6 = 12 has two rectangles with composite side lengths, 4 X 8 and 6 X 6. Furthermore, 4 | 8 and 6 | 6.
a(12) = 24; 2*12 = 24 has four rectangles with composite side lengths where the smallest divides the largest. They are 4 X 20, 6 X 18, 8 X 16 and 12 X 12.
MATHEMATICA
Table[Sum[(1 - Ceiling[(2 n - i)/i] + Floor[(2 n - i)/i]) (1 - PrimePi[i] + PrimePi[i - 1]) (1 - PrimePi[2 n - i] + PrimePi[2 n - i - 1]), {i, 4, n}], {n, 100}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Apr 19 2020
STATUS
approved