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).

This page as a plain text file.
%I A359018 #54 Jun 26 2024 04:22:19
%S A359018 1,7,28,115,406,1492,5104,17611,59077,197242,649540,2127364,6908734,
%T A359018 22325632,71744968,229600123,731794258,2324583475,7360989292,
%U A359018 23245426690,73222477552,230128420012,721764371008,2259438436708,7060738412431,22029510754258,68630377423960
%N A359018 a(n) = Sum_{d|n} d * 3^(d-1).
%H A359018 G. C. Greubel, <a href="/A359018/b359018.txt">Table of n, a(n) for n = 1..1000</a>
%F A359018 G.f.: Sum_{k>=1} x^k/(1 - 3 * x^k)^2.
%t A359018 a[n_] := DivisorSum[n, 3^(#-1)*# &]; Array[a, 27] (* _Amiram Eldar_, Aug 27 2023 *)
%o A359018 (PARI) a(n) = sumdiv(n, d, d*3^(d-1));
%o A359018 (PARI) my(N=30, x='x+O('x^N)); Vec(sum(k=1, N, x^k/(1-3*x^k)^2))
%o A359018 (Magma)
%o A359018 A359018:= func< n | (&+[3^(d-1)*d: d in Divisors(n)]) >;
%o A359018 [A359018(n): n in [1..40]]; // _G. C. Greubel_, Jun 26 2024
%o A359018 (SageMath)
%o A359018 def A359018(n): return sum(3^(k-1)*k for k in (1..n) if (k).divides(n))
%o A359018 [A359018(n) for n in range(1,41)] # _G. C. Greubel_, Jun 26 2024
%Y A359018 Cf. A002129, A034730, A083413, A167531, A359186, A359189.
%K A359018 nonn,easy
%O A359018 1,2
%A A359018 _Seiichi Manyama_, Dec 19 2022