login
A321297
a(n) is the sum of proper divisors of n that are >= sqrt(n) minus the sum of the divisors that are greater than 1 and less than sqrt(n).
0
0, 0, 0, 2, 0, 1, 0, 2, 3, 3, 0, 5, 0, 5, 2, 10, 0, 10, 0, 9, 4, 9, 0, 17, 5, 11, 6, 15, 0, 21, 0, 18, 8, 15, 2, 36, 0, 17, 10, 27, 0, 31, 0, 27, 16, 21, 0, 45, 7, 28, 14, 33, 0, 43, 6, 37, 16, 27, 0, 67, 0, 29, 20, 50, 8, 55, 0, 45, 20, 45, 0, 76, 0, 35, 32
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
Cf. A000203 (sigma), A070038, A079667.
Sequence in context: A340503 A072662 A030010 * A343156 A163577 A132178
KEYWORD
nonn
AUTHOR
Nathaniel J. Strout, Nov 02 2018
STATUS
approved