|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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:
|
|
MATHEMATICA
|
Table[Sum[i*(n-i) (PrimePi[i] - PrimePi[i-1]), {i, Floor[n/2]}], {n, 60}]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|