A332931 Sum of round(sqrt(d)) where d runs through the divisors of n.
1, 2, 3, 4, 3, 6, 4, 7, 6, 7, 4, 11, 5, 9, 9, 11, 5, 13, 5, 13, 11, 10, 6, 19, 8, 11, 11, 16, 6, 20, 7, 17, 12, 12, 12, 24, 7, 12, 13, 22, 7, 24, 8, 19, 19, 14, 8, 30, 11, 19, 14, 20, 8, 25, 13, 26, 15, 15, 9, 37, 9, 16, 22, 25, 15, 28, 9, 22, 16, 28, 9, 40
Offset: 1
Keywords
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Maple
a:= n-> add(round(sqrt(d)), d=numtheory[divisors](n)): seq(a(n), n=1..80); # Alois P. Heinz, Mar 02 2020
-
Mathematica
Table[DivisorSum[n,Floor[1/2+Sqrt[#]]&],{n,80}]
-
PARI
a(n) = sumdiv(n, d, round(sqrt(d))); \\ Michel Marcus, Mar 03 2020
-
Python
from math import isqrt from sympy import divisors def A332931(n): return sum((m:=isqrt(d))+int(d-m*(m+1)>=1) for d in divisors(n,generator=True)) # Chai Wah Wu, Aug 03 2022