OFFSET
1,2
COMMENTS
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..5000
FORMULA
EXAMPLE
For n = 12 the divisors of 12 are 1, 2, 3, 4, 6, 12. The central (or middle) divisors of 12 are 3 and 4, so a(12) = 3 + 4 = 7.
MATHEMATICA
cdn[n_]:=Module[{dn=Divisors[n], len}, len=Length[dn]; Which[ IntegerQ[ Sqrt[n]], Sqrt[n], PrimeQ[n], n+1, OddQ[len], dn[[Floor[len/2]+1]], EvenQ[len], dn[[len/2]]+dn[[len/2+1]]]]; Array[cdn, 70] (* Harvey P. Dale, Nov 07 2012 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Feb 23 2012
STATUS
approved