login
A345035
a(n) = Sum_{k=1..n} (-3)^(floor(n/k) - 1).
3
1, -2, 11, -28, 81, -234, 739, -2216, 6545, -19594, 59139, -177408, 531181, -1593614, 4783799, -14351032, 43044597, -129133854, 387426799, -1162281332, 3486765521, -10460293354, 31381119459, -94143358440, 282429356977, -847288080362, 2541866366171
OFFSET
1,2
LINKS
FORMULA
G.f.: (1/(1 - x)) * Sum_{k>=1} x^k * (1 - x^k)/(1 + 3*x^k).
MATHEMATICA
a[n_] := Sum[(-3)^(Floor[n/k] - 1), {k, 1, n}]; Array[a, 30] (* Amiram Eldar, Jun 06 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, (-3)^(n\k-1));
(PARI) my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, x^k*(1-x^k)/(1+3*x^k))/(1-x))
CROSSREFS
Column k=3 of A345033.
Sequence in context: A296288 A277361 A034534 * A220833 A254627 A206583
KEYWORD
sign
AUTHOR
Seiichi Manyama, Jun 06 2021
STATUS
approved