A135363 Sums of two or more consecutive semiprimes.
10, 15, 19, 24, 25, 29, 33, 36, 39, 43, 47, 48, 50, 51, 54, 58, 59, 60, 67, 68, 69, 72, 73, 75, 77, 79, 82, 83, 84, 85, 91, 93, 94, 95, 97, 100, 101, 102, 106, 107, 109, 112, 115, 116, 118, 120, 122, 123, 126, 127, 128, 133, 134, 140, 142, 143, 146, 148, 151, 152
Offset: 1
Examples
a(1) = 10 = 4 + 6. a(2) = 15 = 6 + 9. a(3) = 19 = 9 + 10 = 4 + 6 + 9. a(4) = 24 = 10 + 14. a(5) = 25 = 6 + 9 + 10. a(6) = 29 = 14 + 15 = 4 + 6 + 9 + 10. a(7) = 33 = 9 + 10 + 14. a(8) = 36 = 15 + 21. a(9) = 39 = 10 + 14 + 15. a(10) = 43 = 21 + 22.
Programs
-
Maple
isA001358 := proc(n) if numtheory[bigomega](n) = 2 then true; else false ; fi ; end: A001358 := proc(n) option remember ; local a; if n <= 3 then op(n,[4,6,9]) ; else a := A001358(n-1)+1 ; while not isA001358(a) do a := a+1 ; od ; RETURN(a) ; fi ; end: isA135363 := proc(n) local frst,lst, psum ; for frst from 1 do if A001358(frst) >= n then RETURN(false) ; fi ; for lst from frst+1 do psum := add(A001358(k),k=frst..lst) ; if psum = n then RETURN(true) ; elif psum > n then break ; fi ; od: od: end: for n from 4 to 200 do if isA135363(n) then printf("%d, ",n) ; fi ; od: # R. J. Mathar, Dec 11 2007
-
Mathematica
okQ[n_] := With[{SP = Select[Range[n], PrimeOmega[#] == 2 &]}, Select[IntegerPartitions[n, {2, Infinity}, SP], SequencePosition[SP, Reverse@#] != {}&]] != {}; Reap[For[k = 10, k < 200, k++, If[okQ[k], Print[k]; Sow[k]]]][[2, 1]] (* Jean-François Alcover, Jan 29 2024 *)
Extensions
Corrected and extended by R. J. Mathar, Dec 11 2007
Comments