login
A345028
a(n) = Sum_{k=1..n} 2^(floor(n/k) - 1).
4
1, 3, 6, 12, 21, 41, 74, 144, 275, 541, 1054, 2102, 4151, 8281, 16484, 32938, 65707, 131391, 262464, 524878, 1049201, 2098291, 4195444, 8390860, 16779477, 33558743, 67113306, 134226304, 268444033, 536887965, 1073758878, 2147517156, 4295001319, 8590001385, 17179936018
OFFSET
1,2
LINKS
FORMULA
G.f.: (1/(1 - x)) * Sum_{k>=1} x^k * (1 - x^k)/(1 - 2*x^k).
MATHEMATICA
a[n_] := Sum[2^(Floor[n/k] - 1), {k, 1, n}]; Array[a, 35] (* Amiram Eldar, Jun 06 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, 2^(n\k-1));
(PARI) my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, x^k*(1-x^k)/(1-2*x^k))/(1-x))
CROSSREFS
Column k=2 of A345032.
Sequence in context: A087503 A092176 A000991 * A095093 A280473 A333820
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jun 06 2021
STATUS
approved