login
A350238
a(n) = Sum_{k=1..n} (-1)^(k+1) * floor((n/(2*k-1))^k).
2
1, 2, 2, 3, 4, 3, 3, 4, 4, 4, 3, 4, 6, 4, 3, 4, 6, 4, 3, 6, 5, 5, 6, 5, 7, 4, 4, 4, 5, 3, 6, 5, 5, 6, 5, 5, 4, 6, 5, 5, 8, 7, 6, 4, 7, 6, 3, 5, 6, 6, 5, 5, 8, 5, 5, 4, 4, 6, 5, 3, 6, 4, 7, 6, 8, 6, 5, 5, 7, 6, 4, 4, 7, 4, 5, 9, 8, 5, 6, 6, 8, 7, 3, 6, 6, 7, 7, 4, 9, 10, 3, 8, 4, 7, 6, 8, 10, 6, 4, 11, 7, 7, 5, 7, 11, 6, 8, 8, 9
OFFSET
1,2
COMMENTS
a(895) = -5.
LINKS
EXAMPLE
a(3) = [3/1] - [(3/3)^2] = 3 - 1 = 2.
a(4) = [4/1] - [(4/3)^2] = 4 - 1 = 3.
a(5) = [5/1] - [(5/3)^2] + [(5/5)^3] = 5 - 2 + 1 = 4.
MATHEMATICA
a[n_] := Sum[(-1)^(k+1) * Floor[(n/(2*k-1))^k], {k, 1, n}]; Array[a, 100] (* Amiram Eldar, Dec 21 2021 *)
PROG
(PARI) a(n) = sum(k=1, (n+1)\2, (-1)^(k+1)*(n^k\(2*k-1)^k));
CROSSREFS
KEYWORD
sign
AUTHOR
Seiichi Manyama, Dec 21 2021
STATUS
approved