A066839 a(n) = sum of positive divisors k of n with k <= sqrt(n).
1, 1, 1, 3, 1, 3, 1, 3, 4, 3, 1, 6, 1, 3, 4, 7, 1, 6, 1, 7, 4, 3, 1, 10, 6, 3, 4, 7, 1, 11, 1, 7, 4, 3, 6, 16, 1, 3, 4, 12, 1, 12, 1, 7, 9, 3, 1, 16, 8, 8, 4, 7, 1, 12, 6, 14, 4, 3, 1, 21, 1, 3, 11, 15, 6, 12, 1, 7, 4, 15, 1, 24, 1, 3, 9, 7, 8, 12, 1, 20, 13, 3, 1, 23, 6, 3, 4, 15, 1, 26, 8, 7, 4, 3
Offset: 1
Keywords
Examples
a(9) = 4 = 1 + 3 because 1 and 3 are the positive divisors of 9 that are <= sqrt(9). a(20) = 7: the divisors of 20 are 1, 2, 4, 5, 10 and 20. a(20) = 1 + 2 + 4 = 7.
Links
- Vaclav Kotesovec, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Harry J. Smith)
- Douglas E. Iannucci, On sums of the small divisors of a natural number, arXiv:1910.11835 [math.NT], 2019.
Programs
-
Haskell
a066839 = sum . a161906_row -- Reinhard Zumkeller, Mar 08 2013
-
Maple
with(numtheory):for n from 1 to 200 do c[n] := 0:d := divisors(n):for i from 1 to nops(d) do if d[i]<=n^.5+10^(-10) then c[n] := c[n]+d[i]:fi:od:od:seq(c[i],i=1..200); # alternative seq(add(d, d in select(x->x^2<=n, numtheory[divisors](n))), n=1..100); # Ridouane Oudra, Jun 24 2025
-
Mathematica
f[n_] := Plus @@ Select[ Divisors@n, # <= Sqrt@n &]; Array[f, 94] (* Robert G. Wilson v, Mar 04 2010 *) Table[Sum[If[n > k*(k-1), k, 0], {k, Divisors[n]}], {n, 1, 100}] (* Vaclav Kotesovec, Oct 22 2024 *)
-
PARI
a(n)=sumdiv(n,d, (d^2<=n)*d) /* Michael Somos, Nov 19 2005 */
-
PARI
{ for (n=1, 1000, d=divisors(n); s=sum(k=1, ceil(length(d)/2), d[k]); write("b066839.txt", n, " ", s) ) } \\ Harry J. Smith, Mar 31 2010
-
Python
from itertools import takewhile from sympy import divisors def A066839(n): return sum(takewhile(lambda x:x**2<=n,divisors(n))) # Chai Wah Wu, Dec 19 2023
-
Sage
[sum(k for k in divisors(n) if k^2<=n) for n in (1..94)] # Giuseppe Coppoletta, Jan 21 2015
Formula
G.f.: Sum_{k>0} k*x^(k^2)/(1-x^k). - Michael Somos, Nov 19 2005
a(n) = Sum_{i=1..floor(sqrt(n))} (-(n mod i) + (n-1) mod i + 1). - José de Jesús Camacho Medina, Feb 21 2021
a(p^(2k+1)) = a(p^(2k)) = (p^(k+1)-1)/(p-1) = A000203(p^k) for k>=0 and p prime. - Chai Wah Wu, Dec 23 2023
Sum_{k=1..n} a(k) ~ 2 * n^(3/2) / 3 [Iannucci, 2019]. - Vaclav Kotesovec, Oct 23 2024
Extensions
More terms from Larry Reeves (larryr(AT)acm.org), Apr 12 2002
Comments