OFFSET
1,2
COMMENTS
See A243917 for definition of non-twin divisor.
LINKS
Jens Kruse Andersen, Table of n, a(n) for n = 1..10000
EXAMPLE
The divisors of 40 are 1, 2, 4, 5, 8, 10, 20, 40. Of these, 1, 5, 20, 40 are non-twin divisors. So a(40) = the sum of these divisors, which is 66.
MAPLE
f:= proc(n) local d; d:= numtheory[divisors](n); convert(d minus map(`+`, d, 2) minus map(`+`, d, -2), `+`) end proc:
map(f, [$1..100]); # Robert Israel, Aug 17 2014
MATHEMATICA
a243984[n_Integer] := Total[Select[Divisors[n], If[And[# <= 2 || Divisible[n, # - 2] == False, Divisible[n, # + 2] == False], True, False] &]]; a243984 /@ Range[68] (* Michael De Vlieger, Aug 17 2014 *)
PROG
(PARI)
a(n) = s=0; fordiv(n, d, if(!((d>2 && n%(d-2)==0) || (d<=n-2 && n%(d+2)==0)), s+=d)); s
for(n=1, 200, print1(a(n), ", ")) \\ Colin Barker, Jun 29 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Juri-Stepan Gerasimov, Jun 16 2014
STATUS
approved