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”).

A132747
a(n) = number of non-isolated divisors of n.
30
0, 2, 0, 2, 0, 3, 0, 2, 0, 2, 0, 4, 0, 2, 0, 2, 0, 3, 0, 4, 0, 2, 0, 4, 0, 2, 0, 2, 0, 5, 0, 2, 0, 2, 0, 4, 0, 2, 0, 4, 0, 5, 0, 2, 0, 2, 0, 4, 0, 2, 0, 2, 0, 3, 0, 4, 0, 2, 0, 6, 0, 2, 0, 2, 0, 3, 0, 2, 0, 2, 0, 6, 0, 2, 0, 2, 0, 3, 0, 4, 0, 2, 0, 6, 0, 2, 0, 2, 0, 7, 0, 2, 0, 2, 0, 4, 0, 2, 0, 4, 0, 3, 0, 2, 0
OFFSET
1,2
COMMENTS
A divisor d of n is non-isolated if either d-1 or d+1 divides n. a(2n-1) = 0 for all n >= 1.
LINKS
FORMULA
a(n) = A000005(n) - A132881(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = log(2) + 1 = A002162 + 1 = 1.693147.... . - Amiram Eldar, Mar 22 2024
EXAMPLE
The positive divisors of 20 are 1,2,4,5,10,20. Of these, 1 and 2 are next to each other and 4 and 5 are next to each other. So a(20) = the number of these divisors, which is 4.
MATHEMATICA
Table[Length[Select[Divisors[n], If[ # > 1, IntegerQ[n/(#*(# - 1))]] || IntegerQ[n/(#*(# + 1))] &]], {n, 1, 90}] (* Stefan Steinerberger, Oct 26 2007 *)
PROG
(PARI) a(n) = my(div = divisors(n)); sumdiv(n, d, vecsearch(div, d-1) || vecsearch(div, d+1)); \\ Michel Marcus, Aug 22 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Aug 27 2007
EXTENSIONS
More terms from Stefan Steinerberger, Oct 26 2007
Extended by Ray Chandler, Jun 24 2008
STATUS
approved