A062198 Sum of first n semiprimes.
4, 10, 19, 29, 43, 58, 79, 101, 126, 152, 185, 219, 254, 292, 331, 377, 426, 477, 532, 589, 647, 709, 774, 843, 917, 994, 1076, 1161, 1247, 1334, 1425, 1518, 1612, 1707, 1813, 1924, 2039, 2157, 2276, 2397, 2519, 2642, 2771, 2904, 3038, 3179, 3321, 3464
Offset: 1
Examples
a(4) = 29 because the sum of the first 4 semiprimes 4+6+9+10 is 29.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
Accumulate[Select[Range[200],PrimeOmega[#]==2&]] (* Harvey P. Dale, Jul 23 2014 *)
-
PARI
is_A062198(N)={ my(n=0); while(N>0, while(bigomega(n++)!=2, ); N-=n); !N} \\ - M. F. Hasler, Sep 23 2012
-
PARI
A062198(n, list)={my(s=0, N=0); until(!n--, until(bigomega(N++)==2, ); s+=N; list & print1(s", ")); s} \\ - M. F. Hasler, Sep 23 2012
Formula
a(n) = Sum_{i=1..n} A001358(i). - R. J. Mathar, Sep 14 2012
Comments