A199331 Number of ordered ways of writing n as the sum of two semiprimes.
0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 1, 2, 2, 2, 2, 0, 3, 4, 3, 2, 0, 2, 4, 4, 2, 2, 3, 4, 5, 6, 4, 0, 2, 6, 6, 4, 2, 6, 6, 4, 5, 8, 7, 4, 2, 8, 10, 6, 5, 2, 5, 6, 4, 10, 6, 4, 4, 10, 12, 12, 2, 6, 10, 6, 7, 8, 9, 6, 5, 12, 14, 10, 6, 6, 7, 8, 7, 10, 10, 6, 4, 14, 14
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
sp:= select(t -> numtheory:-bigomega(t)=2, [$1..100]): G:= expand(add(x^t,t=sp)^2): seq(coeff(G,x,i),i=1..100); # Robert Israel, Nov 24 2020
-
Mathematica
mx=200; semiPrimeQ[n_] := Plus @@ Last /@ FactorInteger@ n == 2; t = Select[ Range@ mx, semiPrimeQ]; s = Sort[Plus @@@ Tuples[t, 2]]; Transpose[ Tally@ Join[ Range@ mx, s]][[2]] - 1
Formula
a(n) = Sum_{k=1..n-1} c(k) * c(n-k), where c = A064911. - Wesley Ivan Hurt, Jan 07 2024
Extensions
Definition clarified by Robert Israel, Nov 24 2020
Comments