OFFSET
1,2
FORMULA
a(n) = Sum_{d1|(2*n), d2|(2*n), d1 < d2} c(d1 + d2), where c is the prime characteristic (A010051).
EXAMPLE
a(4) = 2; 2*4 = 8 has four divisors 1,2,4 and 8. Of the 6 ordered pairs of divisors (d1,d2) such that d1 < d2, i.e., (1,2), (1,4), (1,8), (2,4), (2,8), (4,8), two of them have coordinates that sum to a prime, namely (1,2) as 1 + 2 = 3 and (1,4) as 1 + 4 = 5. So a(4) = 2.
MATHEMATICA
Table[Sum[Sum[(PrimePi[i + k] - PrimePi[i + k - 1])*(1 - Ceiling[2 n/k] + Floor[2 n/k]) (1 - Ceiling[2 n/i] + Floor[2 n/i]), {i, k - 1}], {k, 2 n}], {n, 100}]
PROG
(PARI) a(n) = my(d=divisors(2*n)); sum(i=1, #d-1, sum(j=i+1, #d, isprime(d[i]+d[j]))); \\ Michel Marcus, Oct 06 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Oct 05 2020
STATUS
approved