login
a(n) = the number of primes S possible, if S = product of b(k)'s + product of c(k)'s, where the distinct positive integers <= n are partitioned into the two sets {b(k)} and {c(k)}.
2

%I #5 Oct 10 2019 10:25:49

%S 1,1,1,2,1,3,1,3,2,0,0,3,1,4,1,2,1,1,1,1,3,3,1,1,1,1,2,1,1,0,2,3,2,4,

%T 2,0,0,3,1,1,2,4,4,1,5,5,5,5,4,2,0,3,4,11,4,6,8,4,4,6,6,8,6,2,2,4,4,

%U 11,7,6,13,13,19,42,15,19,14,18,19,30,38,29,12,24,24,41,15,10,12,28,19,22,27

%N a(n) = the number of primes S possible, if S = product of b(k)'s + product of c(k)'s, where the distinct positive integers <= n are partitioned into the two sets {b(k)} and {c(k)}.

%C a(0)=a(1)=1 because the product over the empty set is defined here as 1. For S to be a prime, the positive integers <= n, except 1 and the primes > n/2, must all be together in either {b(k)} or {c(k)}. If p is a prime where n/2 < p <= n, then it is possible that p is in either product of the S sum, as can 1.

%e For n = 5 we have the primes 23 = 1*2*4 + 3*5, 29 = 1*2*3*4 + 5, 43 = 1*2*4*5 + 3, so a(5)=3.

%t f[n_] := Block[{d = Divisors[Times @@ Select[Range[n], PrimeQ[ # ] && 2# > n &]]},Select[Union[d + n!/d], PrimeQ]];Length /@ Array[f, 100, 0]

%Y Cf. A127165, A127166.

%K nonn

%O 0,4

%A _Ray Chandler_, Feb 18 2007