A344404 a(n) = Sum_{d|n} floor(n/d^2).
1, 2, 3, 5, 5, 7, 7, 10, 10, 12, 11, 16, 13, 17, 16, 21, 17, 24, 19, 26, 23, 27, 23, 33, 26, 32, 30, 36, 29, 41, 31, 42, 36, 42, 36, 52, 37, 47, 43, 53, 41, 57, 43, 57, 51, 57, 47, 69, 50, 64, 56, 68, 53, 74, 57, 74, 63, 72, 59, 87, 61, 77, 71, 85, 67, 90, 67, 89, 76, 90, 71
Offset: 1
Keywords
Programs
-
Mathematica
Table[Sum[(1 - Ceiling[n/k] + Floor[n/k]) Floor[n/k^2], {k, n}], {n, 100}]
-
PARI
a(n) = sumdiv(n, d, n\d^2); \\ Michel Marcus, May 17 2021
Formula
a(p) = Sum_{d|p} floor(p/d^2) = p + 0 = p, for prime p.
a(p^k) = Sum_{i=1..floor(k/2)+1} p^(k-2*i+2), where p is prime and k is a positive integer.
G.f.: Sum_{k>=1} x^(k^2)/((1 - x^k)*(1 - x^(k^2))). - Miles Wilson, Jun 11 2025