OFFSET
1,3
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..5000
FORMULA
G.f.: (1/(1 - x)) * Sum_{k>=1} x^k * (1 - x^k)/(1 + k*x^k).
|a(n)| ~ 3^((n - mod(n,3))/3 - 1). - Vaclav Kotesovec, Jun 12 2021
MATHEMATICA
a[n_] := Sum[(-k)^(Floor[n/k] - 1), {k, 1, n}]; Array[a, 45] (* Amiram Eldar, Jun 06 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, (-k)^(n\k-1));
(PARI) my(N=66, x='x+O('x^N)); Vec(sum(k=1, N, x^k*(1-x^k)/(1+k*x^k))/(1-x))
CROSSREFS
KEYWORD
sign
AUTHOR
Seiichi Manyama, Jun 06 2021
STATUS
approved