login
A337982
Number of pairs of divisors of 2n, (d1,d2) such that d1 < d2 and d1 + d2 is prime.
1
1, 2, 3, 2, 3, 6, 1, 3, 5, 4, 3, 7, 1, 4, 9, 3, 2, 10, 1, 6, 7, 4, 2, 9, 3, 4, 6, 4, 3, 16, 1, 3, 7, 3, 7, 13, 1, 3, 7, 7, 3, 14, 1, 6, 14, 3, 1, 10, 1, 6, 8, 4, 2, 13, 5, 7, 5, 4, 2, 22, 1, 2, 11, 3, 7, 13, 1, 4, 7, 10, 2, 15, 1, 4, 12, 3, 5, 14, 1, 8, 8, 4, 2, 18, 4, 4, 7
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
Cf. A010051.
Sequence in context: A199334 A330903 A278910 * A235669 A118088 A298211
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Oct 05 2020
STATUS
approved