OFFSET
1,3
COMMENTS
Sum of the largest proper divisors of all positive integers <= n.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Least Prime Factor.
Eric Weisstein's World of Mathematics, Proper Divisor.
FORMULA
a(n) = Sum_{k=2..n} k/A020639(k).
a(n) + 1 = Sum_{k=1..n} A032742(k).
a(p^k) = a(p^k-1) + p^(k-1), when p is prime.
a(n) ~ c * n^2, where c = (1/2) * Sum_{k>=1} A005867(k-1)/(prime(k)*A002110(k)) = 0.165049... . - Amiram Eldar, Jul 03 2025
EXAMPLE
For n = 8 the divisors of the first eight positive integers are {1}, {1, 2}, {1, 3}, {1, 2, 4}, {1, 5}, {1, 2, 3, 6}, {1, 7}, {1, 2, 4, 8}, so a(8) = 1 + 1 + 2 + 1 + 3 + 1 + 4 = 13.
MATHEMATICA
Table[Sum[k/FactorInteger[k][[1, 1]], {k, 2, n}], {n, 71}]
Join[{0}, Accumulate[Table[k/FactorInteger[k][[1, 1]], {k, 2, 71}]]] (* Amiram Eldar, Jul 03 2025 *)
PROG
(PARI) list(kmax) = {my(s = 0); print1(s, ", "); for(k = 2, kmax, s += k/factor(k)[1, 1]; print1(s, ", ")); } \\ Amiram Eldar, Jul 03 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Jan 02 2017
STATUS
approved
