login
A345108
a(n) = Sum_{k=1..n} 2^(n - floor(n/k)).
2
1, 3, 9, 21, 57, 121, 305, 657, 1505, 3233, 7489, 15169, 34433, 72833, 156929, 325889, 717313, 1462785, 3187713, 6538241, 13846529, 28739585, 61673473, 124063745, 263856129, 544481281, 1139032065, 2326282241, 4920999937, 9924804609, 20923351041, 42635165697
OFFSET
1,2
LINKS
FORMULA
G.f.: (1/(1 - 2*x)) * Sum_{k>=1} 2^(k-1)*x^k * (1 - (2*x)^k)/(1 - 2^(k-1)*x^k).
MATHEMATICA
a[n_] := Sum[2^(n - Floor[n/k]), {k, 1, n}]; Array[a, 30] (* Amiram Eldar, Jun 08 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, 2^(n-n\k));
(PARI) my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, 2^(k-1)*x^k*(1-(2*x)^k)/(1-2^(k-1)*x^k))/(1-2*x))
CROSSREFS
Sequence in context: A191796 A367111 A372375 * A007056 A026551 A296719
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jun 08 2021
STATUS
approved