OFFSET
1,2
COMMENTS
a(n) >= 1 since for all n >= 1, 2n has the divisor pair (1,2) with 1 < 2 and 1*2 + 1 = 3 (prime).
FORMULA
a(n) = Sum_{d1|(2*n), d2|(2*n), d1 < d2} sign(c(d1*d2 + 1) + c(d1*d2 - 1)), where c is the prime characteristic (A010051).
EXAMPLE
a(3) = 6; 2*3 = 6 has 6 divisor pairs (d1,d2) such that d1 < d2 where at least one of d1*d2 +- 1 is prime: (1,2), (1,3), (1,6), (2,3), (2,6), (3,6) as (1*2 + 1) = 3, (1*3 - 1) = 2, (1*6 + 1) = 7, (2*3 - 1) = 5, (2*6 - 1) = 11, and (3*6 - 1) = 17 (all prime).
MATHEMATICA
Table[Sum[Sum[Sign[PrimePi[i*k - 1] - PrimePi[i*k - 2] + PrimePi[i*k + 1] - PrimePi[i*k]]*(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, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Nov 22 2020
STATUS
approved