login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A344814 a(n) = Sum_{k=1..n} floor(n/k) * 3^(k-1). 12
1, 5, 15, 46, 128, 384, 1114, 3332, 9903, 29671, 88721, 266151, 797593, 2392649, 7175709, 21526834, 64573556, 193720536, 581141026, 1743422288, 5230207428, 15690619684, 47071679294, 141215037738, 423644574301, 1270933715189, 3812799550089, 11438398630159 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Partial sums of A034730.
LINKS
FORMULA
a(n) = Sum_{k=1..n} Sum_{d|k} 3^(d-1).
G.f.: (1/(1 - x)) * Sum_{k>=1} x^k/(1 - 3*x^k).
G.f.: (1/(1 - x)) * Sum_{k>=1} 3^(k-1) * x^k/(1 - x^k).
a(n) ~ 3^n / 2. - Vaclav Kotesovec, Jun 05 2021
a(n) = (1/2) * Sum_{k=1..n} (3^floor(n/k) - 1). - Ridouane Oudra, Feb 05 2023
MAPLE
seq(add(3^(k-1)*floor(n/k), k=1..n), n=1..60); # Ridouane Oudra, Feb 05 2023
MATHEMATICA
a[n_] := Sum[3^(k - 1) * Quotient[n, k], {k, 1, n}]; Array[a, 30] (* Amiram Eldar, May 29 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, n\k*3^(k-1));
(PARI) a(n) = sum(k=1, n, sumdiv(k, d, 3^(d-1)));
(PARI) my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, x^k/(1-3*x^k))/(1-x))
(PARI) my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, 3^(k-1)*x^k/(1-x^k))/(1-x))
(Magma)
A344814:= func< n | (&+[Floor(n/k)*3^(k-1): k in [1..n]]) >;
[A344814(n): n in [1..40]]; // G. C. Greubel, Jun 26 2024
(SageMath)
def A344814(n): return sum((n//k)*3^(k-1) for k in range(1, n+1))
[A344814(n) for n in range(1, 41)] # G. C. Greubel, Jun 26 2024
CROSSREFS
Column k=3 of A344821.
Sequence in context: A001869 A058425 A079798 * A037504 A197237 A307242
KEYWORD
nonn,changed
AUTHOR
Seiichi Manyama, May 29 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 6 19:53 EDT 2024. Contains 374058 sequences. (Running on oeis4.)