login
A350239
a(n) = Sum_{k=1..n} (-1)^(k+1) * floor((n/(2*k))^k).
2
0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 0, 0, 2, 2, 2, 2, 3, 1, 0, 1, 3, 2, 2, 1, 4, -1, -1, 2, 2, 2, 1, 2, 1, 1, 0, 2, 3, 1, 2, 0, 2, 0, -2, 1, 2, 2, -1, 2, 2, -2, 2, 1, 2, 2, -1, 0, 3, 3, -1, -1, 7, 2, 2, 1, 2, 0, 0, -2, 3, 1, 2, -2, 4, -3, -2, -2, 3, 1, -1, 0, 1, 2, 1, 1, 0, 2, 3, 1, 5, 2, -1, 2, 4, 1, 1, 0, 1, 1
OFFSET
1,6
LINKS
EXAMPLE
a(3) = [3/2] = 1.
a(4) = [4/2] - [(4/4)^2] = 2 - 1 = 1.
a(5) = [5/2] - [(5/4)^2] = 2 - 1 = 1.
MATHEMATICA
a[n_] := Sum[(-1)^(k + 1)*Floor[(n/(2*k))^k], {k, 1, n}]; Array[a, 100] (* Amiram Eldar, Dec 21 2021 *)
PROG
(PARI) a(n) = sum(k=1, n\2, (-1)^(k+1)*(n^k\(2*k)^k));
CROSSREFS
Sequence in context: A187759 A358565 A270645 * A268059 A037226 A089641
KEYWORD
sign
AUTHOR
Seiichi Manyama, Dec 21 2021
STATUS
approved