[go: up one dir, main page]

login
A345029
a(n) = Sum_{k=1..n} 3^(floor(n/k) - 1).
3
1, 4, 11, 32, 87, 258, 745, 2224, 6605, 19784, 59151, 177438, 531733, 1595104, 4783811, 14351228, 43049043, 129147030, 387427357, 1162281532, 3486804959, 10460413130, 31381119537, 94143358500, 282429716209, 847289143468, 2541866366735, 7625599086782
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 A345032.
Sequence in context: A027153 A319918 A034754 * A268744 A038747 A052545
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jun 06 2021
STATUS
approved