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.

Showing 1-2 of 2 results.

A363912 Row sums of A363733.

Original entry on oeis.org

1, 1, 2, 5, 12, 30, 80, 236, 782, 2872, 11551, 50208, 233475, 1153424, 6022129, 33094892, 190798443, 1150698311, 7241821945, 47455029775, 323155438297, 2282781968327, 16700909857189, 126356647220803, 987303496571557, 7957134024398329, 66071773173223712
Offset: 0

Views

Author

Peter Luschny, Jun 28 2023

Keywords

Crossrefs

Cf. A363733.

Programs

  • Maple
    # Using function A from A363733.
    seq(add(A(n - k, k), k = 0..n), n = 0..26);

A363913 a(n) = Sum_{k=0..n} divides(k, n) * 3^k, where divides(k, n) = 1 if k divides n, otherwise 0.

Original entry on oeis.org

1, 3, 12, 30, 93, 246, 768, 2190, 6654, 19713, 59304, 177150, 532290, 1594326, 4785168, 14349180, 43053375, 129140166, 387440940, 1162261470, 3486843786, 10460355420, 31381236768, 94143178830, 282430075332, 847288609689, 2541867422664, 7625597504700, 22876797240210
Offset: 0

Views

Author

Peter Luschny, Jun 28 2023

Keywords

Crossrefs

Cf. A000007 (m = 0), A000005 (m = 1), A055895 (m = 2), this sequence (m = 3).

Programs

  • Magma
    A363913:= func< n | n eq 0 select 1 else 3*(&+[3^(d-1): d in Divisors(n)]) >;
    [A363913(n): n in [0..40]]; // G. C. Greubel, Jun 26 2024
  • Maple
    divides := (k, n) -> ifelse(k = n or (k > 0 and irem(n, k) = 0), 1, 0):
    a := n -> local j; add(divides(j, n) * 3^j, j = 0 ..n): seq(a(n), n = 0..28);
  • Mathematica
    A363913[n_]:= If[n==0, 1, 3*DivisorSum[n, 3^(#-1) &]];
    Table[A363913[n], {n,0,40}] (* G. C. Greubel, Jun 26 2024 *)
  • Python
    from sympy import divisors
    def A363913(n): return sum(3**k for k in divisors(n,generator=True)) if n else 1 # Chai Wah Wu, Jun 28 2023
    
  • SageMath
    def a(n): return sum(3^k * k.divides(n) for k in srange(n+1))
    print([a(n) for n in range(29)])
    

Formula

a(n) = Sum_{j=0..n} A113704(j, n) * m^j for m = 3; for other cases see the crossreferences.
a(n) = 3*A034730(n), n>=1. - R. J. Mathar, Jul 04 2023
Showing 1-2 of 2 results.