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.

A359018 a(n) = Sum_{d|n} d * 3^(d-1).

Original entry on oeis.org

1, 7, 28, 115, 406, 1492, 5104, 17611, 59077, 197242, 649540, 2127364, 6908734, 22325632, 71744968, 229600123, 731794258, 2324583475, 7360989292, 23245426690, 73222477552, 230128420012, 721764371008, 2259438436708, 7060738412431, 22029510754258, 68630377423960
Offset: 1

Views

Author

Seiichi Manyama, Dec 19 2022

Keywords

Crossrefs

Programs

  • Magma
    A359018:= func< n | (&+[3^(d-1)*d: d in Divisors(n)]) >;
    [A359018(n): n in [1..40]]; // G. C. Greubel, Jun 26 2024
    
  • Mathematica
    a[n_] := DivisorSum[n, 3^(#-1)*# &]; Array[a, 27] (* Amiram Eldar, Aug 27 2023 *)
  • PARI
    a(n) = sumdiv(n, d, d*3^(d-1));
    
  • PARI
    my(N=30, x='x+O('x^N)); Vec(sum(k=1, N, x^k/(1-3*x^k)^2))
    
  • SageMath
    def A359018(n): return sum(3^(k-1)*k for k in (1..n) if (k).divides(n))
    [A359018(n) for n in range(1,41)] # G. C. Greubel, Jun 26 2024

Formula

G.f.: Sum_{k>=1} x^k/(1 - 3 * x^k)^2.