OFFSET
1,3
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..5000
EXAMPLE
a(3) = [3/1] - [(3/2)^2] + [(3/3)^3] = 3 - 2 + 1 = 2.
a(4) = [4/1] - [(4/2)^2] + [(4/3)^3] - [(4/4)^4] = 4 - 4 + 2 - 1 = 1.
MATHEMATICA
a[n_] := Sum[(-1)^(k + 1)*Floor[(n/k)^k], {k, 1, n}]; Array[a, 100] (* Amiram Eldar, Dec 20 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, (-1)^(k+1)*(n^k\k^k));
CROSSREFS
KEYWORD
sign
AUTHOR
Seiichi Manyama, Dec 20 2021
STATUS
approved