# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a079725 Showing 1-1 of 1 %I A079725 #13 Jul 17 2022 23:27:37 %S A079725 0,0,4,10,37,49,94,112,175,305,335,505,622,664,799,1049,1329,1389, %T A079725 1709,1916,1988,2368,2611,3041,3692,3989,4091,4406,4514,4847,6407, %U A079725 6794,7464,7602,8898,9048,9818,10618,11113,11963,12843,13023,14697,14889,15474 %N A079725 Sum of composite numbers less than n-th prime. %F A079725 a(n) = prime(n)*(prime(n)+1)/2 - sum_{1..n} prime(k) - 1. %F A079725 Asymptotic expression: a(n) ~ n^2 * log(n)^2 / 2. %e A079725 Prime(6) = 13, so a(6) = 4 + 6 + 8 + 9 + 1 0 + 12 = 49 = 13*14/2 - 13 - 11 - 7 - 5 - 3 - 2 - 1. %p A079725 with(numtheory): A079725 := proc(n) local i: %p A079725 RETURN(ithprime(n)*(ithprime(n)+1)/2 add(ithprime(i),i=1..n)-1): %p A079725 end; %t A079725 a[n_] := Block[{p = Prime[n], k}, k = p(p + 1)/2 - 1 - Sum[Prime[i], {i, 1, n}]]; Table[ a[n], {n, 1, 45}] %Y A079725 Equals A000217(Prime_n) - A007504(n) - 1 = A034953 - A007504 - A000012. %Y A079725 Partial sums of A054265. %K A079725 nonn,easy %O A079725 1,3 %A A079725 _N. J. A. Sloane_, Feb 18 2003 %E A079725 Edited and extended by Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), _Robert G. Wilson v_ and _T. D. Noe_, Feb 18 2003 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE