A132748 a(n) = the sum of the positive non-isolated divisors of n.
0, 3, 0, 3, 0, 6, 0, 3, 0, 3, 0, 10, 0, 3, 0, 3, 0, 6, 0, 12, 0, 3, 0, 10, 0, 3, 0, 3, 0, 17, 0, 3, 0, 3, 0, 10, 0, 3, 0, 12, 0, 19, 0, 3, 0, 3, 0, 10, 0, 3, 0, 3, 0, 6, 0, 18, 0, 3, 0, 21, 0, 3, 0, 3, 0, 6, 0, 3, 0, 3, 0, 27, 0, 3, 0, 3, 0, 6, 0, 12, 0, 3, 0, 23, 0, 3, 0, 3, 0, 36, 0, 3, 0, 3, 0, 10, 0, 3
Offset: 1
Keywords
Examples
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) = 1+2+4+5 = 12.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..20000
Programs
-
Mathematica
Table[Plus @@ (Select[Divisors[n], If[ # > 1,Mod[n, #*(# - 1)] == 0] || Mod[n, #*(# + 1)] == 0 &]), {n, 1, 80}] (* Stefan Steinerberger, Nov 01 2007 *)
-
PARI
A132748(n) = sumdiv(n,d,((!(n%(1+d)))||((d>1)&&(!(n%(d-1)))))*d); \\ Antti Karttunen, Dec 19 2018
Extensions
More terms from Stefan Steinerberger, Nov 01 2007
Extended by Ray Chandler, Jun 24 2008
Comments