OFFSET
1,5
COMMENTS
Number of primes of form x*y+1 with x+y=n.
EXAMPLE
a(7) = 3, 1*6 +1 = 7, 2*5 +1 = 11, 3*4 +1 = 13.
n=16: {m: m=x*y+1 and x+y=16} = {16,29,40,49,56,61,64,65} containing two primes: 29 and 61, therefore a(16)=2.
n = 7 is the only number which gives primes for all possible values of k.
MATHEMATICA
a[n_] := Select[(Times @@ # + 1&) /@ IntegerPartitions[n, {2}], PrimeQ] // Length;
Array[a, 95] (* Jean-François Alcover, Aug 02 2018 *)
PROG
(PARI) { a(n)=local(r); r=0; for(k=1, n\2, if(isprime(k*(n-k)+1), r++)); r } (Alekseyev)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jan 27 2004
EXTENSIONS
More terms from Max Alekseyev, Oct 04 2005
Edited by N. J. A. Sloane, Aug 23 2008 at the suggestion of R. J. Mathar
STATUS
approved