OFFSET
1,4
FORMULA
a(p) = 0, for primes p.
a(n) = 2*A070038(n) - sigma(n) - n + 1 for n > 1. - Andrew Howroyd, Nov 25 2018
MATHEMATICA
Array[Function[{d, s}, 1 + Subtract @@ (Total /@ Reverse@ TakeDrop[d, LengthWhile[d, # < s &]])] @@ {Most@ Divisors[#], Sqrt@ #} &, 74, 2] (* Michael De Vlieger, Nov 25 2018 *)
PROG
(PARI) a(n)=sumdiv(n, d, if(d>1&&d<n, if(d>=n/d, d, -d)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Nathaniel J. Strout, Nov 02 2018
STATUS
approved