login
A343758
Total area of all p X r rectangles, where n = p + r, p <= r, p is prime and r is a positive integer.
2
0, 0, 0, 4, 6, 17, 22, 27, 32, 62, 72, 82, 92, 151, 168, 185, 202, 219, 236, 253, 270, 408, 436, 464, 492, 689, 730, 771, 812, 853, 894, 935, 976, 1306, 1364, 1422, 1480, 1899, 1976, 2053, 2130, 2207, 2284, 2361, 2438, 3044, 3144, 3244, 3344, 3444, 3544, 3644, 3744, 3844
OFFSET
1,4
LINKS
FORMULA
a(n) = Sum_{k=1..floor(n/2)} k*(n-k)*c(k), where c is the prime characteristic (A010051).
EXAMPLE
a(6) = 17; the rectangles are 2 X 4 and 3 X 3. The total area of both rectangles is then 2*4 + 3*3 = 8 + 9 = 17.
MAPLE
P:= select(isprime, [2, seq(i, i=3..50, 2)]):
f:= proc(n) local p, m, i;
m:= ListTools:-BinaryPlace(P, (n+1)/2);
add(P[i]*(n-P[i]), i=1..m)
end proc:
map(f, [$1..100]); # Robert Israel, Dec 21 2022
MATHEMATICA
Table[Sum[i*(n-i) (PrimePi[i] - PrimePi[i-1]), {i, Floor[n/2]}], {n, 60}]
CROSSREFS
Sequence in context: A226631 A226634 A105271 * A024305 A342231 A320245
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Apr 27 2021
STATUS
approved