OFFSET
1,6
COMMENTS
a(n) is the number of composites <= n that divide 2*n. - Robert Israel, Jan 29 2025
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
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.
MAPLE
f:= proc(n) local r, s, t;
nops(select(t -> t <= n and not isprime(t), numtheory:-divisors(2*n) minus {1}))
end proc:
map(f, [$1..200]); # Robert Israel, Jan 29 2025
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