login
A339708
a(n) is the number of decompositions of 2*n as the sum of an odd prime and a semiprime.
2
0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 1, 3, 4, 1, 4, 2, 2, 6, 4, 3, 5, 5, 2, 4, 7, 4, 7, 6, 3, 10, 5, 4, 10, 6, 6, 7, 8, 5, 9, 9, 4, 8, 10, 4, 11, 10, 9, 13, 9, 7, 10, 10, 9, 10, 9, 8, 11, 13, 4, 16, 13, 9, 15, 11, 11, 13, 14, 13, 13, 10, 10, 15, 16, 8, 19, 11, 11, 17, 14, 15, 17, 18, 9, 13, 17, 15
OFFSET
1,10
LINKS
EXAMPLE
a(10) = 2 because 20 = 5+15 = 11+9 where 5 and 11 are primes and 15 and 9 are semiprimes.
MAPLE
N:= 300: # for a(1)..a(N/2)
P:= select(isprime, [seq(i, i=3..N, 2)]):
S:= sort(select(`<`, [seq(seq(P[i]*P[j], i=1..j), j=1..nops(P))], N)):
V:= Vector(N):
for p in P do
for s in S do
v:= p+s;
if v>N then break fi;
V[v]:= V[v]+1
od od:
seq(V[i], i=2..N, 2);
MATHEMATICA
{0}~Join~Array[Count[IntegerPartitions[2 #, {2}, All, -(# - 2)], _?(And[AnyTrue[#, PrimeQ], AnyTrue[#, PrimeOmega[#] == 2 &]] &)] &, 86, 2] (* Michael De Vlieger, Dec 13 2020 *)
PROG
(PARI) a(n) = {my(nb=0); forprime(p=3, 2*n, if (bigomega(2*n-p) == 2, nb++); ); nb; } \\ Michel Marcus, Dec 14 2020
CROSSREFS
KEYWORD
nonn,look
AUTHOR
J. M. Bergot and Robert Israel, Dec 13 2020
STATUS
approved