login
A345107
a(n) = Sum_{k=1..n} (-k)^(n - floor(n/k)).
2
1, -1, 14, -86, 955, -11851, 183800, -3273914, 67643293, -1571615577, 40838683608, -1170198385960, 36717193651461, -1251181160936837, 46033142685018824, -1818354391006060750, 76762360864947676457, -3448789505696369210193
OFFSET
1,3
LINKS
FORMULA
G.f.: Sum_{k>=1} (-k)^(k-1)*x^k * (1 - (-k*x)^k)/((1 - (-k)^(k-1)*x^k) * (1 + k*x)).
MATHEMATICA
a[n_] := Sum[(-k)^(n - Floor[n/k]), {k, 1, n}]; Array[a, 20] (* Amiram Eldar, Jun 08 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, (-k)^(n-n\k));
(PARI) my(N=20, x='x+O('x^N)); Vec(sum(k=1, N, (-k)^(k-1)*x^k*(1-(-k*x)^k)/((1-(-k)^(k-1)*x^k)*(1+k*x))))
CROSSREFS
Sequence in context: A125324 A126482 A206614 * A321941 A116343 A259473
KEYWORD
sign
AUTHOR
Seiichi Manyama, Jun 08 2021
STATUS
approved