cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A344815 a(n) = Sum_{k=1..n} floor(n/k) * 4^(k-1).

Original entry on oeis.org

1, 6, 23, 92, 349, 1394, 5491, 21944, 87497, 349902, 1398479, 5593892, 22371109, 89484074, 357919803, 1431678080, 5726645377, 22906581142, 91626057879, 366504227292, 1466015859181, 5864063418866, 23456249463283, 93824997852744, 375299974563657, 1501199898183502
Offset: 1

Views

Author

Seiichi Manyama, May 29 2021

Keywords

Comments

Partial sums of A339684.

Crossrefs

Column k=4 of A344821.
Sums of the form Sum_{k=1..n} q^(k-1)*floor(n/k): A344820 (q=-n), A344819 (q=-4), A344818 (q=-3), A344817 (q=-2), A059851 (q=-1), A006218 (q=1), A268235 (q=2), A344814 (q=3), this sequence (q=4), A344816 (q=5), A332533 (q=n).

Programs

  • Magma
    A344815:= func< n | (&+[Floor(n/j)*4^(j-1): j in [1..n]]) >;
    [A344815(n): n in [1..40]]; // G. C. Greubel, Jun 27 2024
    
  • Maple
    seq(add(4^(k-1)*floor(n/k), k=1..n), n=1..60); # Ridouane Oudra, Feb 16 2023
  • Mathematica
    a[n_] := Sum[4^(k - 1) * Quotient[n, k], {k, 1, n}]; Array[a, 30] (* Amiram Eldar, May 29 2021 *)
  • PARI
    a(n) = sum(k=1, n, n\k*4^(k-1));
    
  • PARI
    a(n) = sum(k=1, n, sumdiv(k, d, 4^(d-1)));
    
  • PARI
    my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, x^k/(1-4*x^k))/(1-x))
    
  • PARI
    my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, 4^(k-1)*x^k/(1-x^k))/(1-x))
    
  • SageMath
    def A344815(n): return sum((n//j)*4^(j-1) for j in range(1,n+1))
    [A344815(n) for n in range(1,41)] # G. C. Greubel, Jun 27 2024

Formula

a(n) = Sum_{k=1..n} Sum_{d|k} 4^(d-1).
G.f.: (1/(1 - x)) * Sum_{k>=1} x^k/(1 - 4*x^k).
G.f.: (1/(1 - x)) * Sum_{k>=1} 4^(k-1) * x^k/(1 - x^k).
a(n) ~ 4^n / 3. - Vaclav Kotesovec, Jun 05 2021
a(n) = (1/3) * Sum_{k=1..n} (4^floor(n/k) - 1). - Ridouane Oudra, Feb 16 2023