# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a343758 Showing 1-1 of 1 %I A343758 #8 Dec 21 2022 17:39:40 %S A343758 0,0,0,4,6,17,22,27,32,62,72,82,92,151,168,185,202,219,236,253,270, %T A343758 408,436,464,492,689,730,771,812,853,894,935,976,1306,1364,1422,1480, %U A343758 1899,1976,2053,2130,2207,2284,2361,2438,3044,3144,3244,3344,3444,3544,3644,3744,3844 %N A343758 Total area of all p X r rectangles, where n = p + r, p <= r, p is prime and r is a positive integer. %H A343758 Robert Israel, Table of n, a(n) for n = 1..10000 %F A343758 a(n) = Sum_{k=1..floor(n/2)} k*(n-k)*c(k), where c is the prime characteristic (A010051). %e A343758 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. %p A343758 P:= select(isprime, [2,seq(i,i=3..50,2)]): %p A343758 f:= proc(n) local p, m,i; %p A343758 m:= ListTools:-BinaryPlace(P,(n+1)/2); %p A343758 add(P[i]*(n-P[i]), i=1..m) %p A343758 end proc: %p A343758 map(f, [$1..100]); # _Robert Israel_, Dec 21 2022 %t A343758 Table[Sum[i*(n-i) (PrimePi[i] - PrimePi[i-1]), {i, Floor[n/2]}], {n, 60}] %Y A343758 Cf. A010051, A343759. %K A343758 nonn %O A343758 1,4 %A A343758 _Wesley Ivan Hurt_, Apr 27 2021 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE