login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A243865
Number of twin divisors of n.
5
0, 0, 2, 2, 0, 2, 0, 2, 2, 0, 0, 5, 0, 0, 3, 2, 0, 2, 0, 2, 2, 0, 0, 6, 0, 0, 2, 2, 0, 3, 0, 2, 2, 0, 2, 5, 0, 0, 2, 4, 0, 2, 0, 2, 3, 0, 0, 6, 0, 0, 2, 2, 0, 2, 0, 2, 2, 0, 0, 8, 0, 0, 4, 2, 0, 2, 0, 2, 2, 2, 0, 6, 0, 0, 3, 2, 0, 2, 0, 4, 2, 0, 0, 7, 0, 0, 2, 2, 0, 3, 0, 2, 2, 0, 0, 6
OFFSET
1,3
COMMENTS
A divisor m of n is a twin divisor if m-2 (for m >= 3) and m+2 (for m <= n-2) also divide n.
LINKS
FORMULA
a(n) = A000005(n) - A243917(n).
a(3n) > 1 for all n >= 1.
a(A099477(n)) = 0, a(A059267(n)) > 0.
A099475(n) <= a(n) <= A000005(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = log(2)/2 + 17/12 = 1.7632402569... . - Amiram Eldar, Mar 22 2024
EXAMPLE
The positive divisors of 20 are 1, 2, 4, 5, 10, 20. Of these, 2 and 4 are twin divisors: (2)+2 = 4, which divides n, and (4)-2 = 2 also divides n. So a(20) = the number of these divisors, which is 2.
PROG
(PARI) a(n) = sumdiv(n, d, ((d>2) && !(n % (d-2))) || !(n % (d+2))); \\ Michel Marcus, Jun 25 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved