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.

A337180 a(n) = Sum_{d|n} d * gcd(d,n/d).

Original entry on oeis.org

1, 3, 4, 9, 6, 12, 8, 21, 19, 18, 12, 36, 14, 24, 24, 53, 18, 57, 20, 54, 32, 36, 24, 84, 51, 42, 64, 72, 30, 72, 32, 117, 48, 54, 48, 171, 38, 60, 56, 126, 42, 96, 44, 108, 114, 72, 48, 212, 99, 153, 72, 126, 54, 192, 72, 168, 80, 90, 60, 216, 62, 96, 152, 277, 84, 144
Offset: 1

Views

Author

Wesley Ivan Hurt, Jan 28 2021

Keywords

Comments

If p is prime, a(n) = Sum_{d|p} d * gcd(d,p/d) = 1*1 + p*1 = p + 1. - Wesley Ivan Hurt, May 21 2021

Crossrefs

Programs

  • Mathematica
    Table[Sum[k*GCD[k, n/k] (1 - Ceiling[n/k] + Floor[n/k]), {k, n}], {n, 100}]
    (* Second program: *)
    Table[DivisorSum[n, # GCD[#, n/#] &], {n, 100}] (* Michael De Vlieger, Nov 11 2021 *)
  • PARI
    a(n) = sumdiv(n, d, d*gcd(d, n/d)); \\ Michel Marcus, Jan 29 2021

Formula

Multiplicative with a(p^e) = (p^(2*floor(e/2)+2)-1)/(p^2-1) + p^e*ceiling(e/2). - Sebastian Karlsson, Nov 11 2021
Sum_{k=1..n} a(k) ~ c * n^2, where c = (5*zeta(4))/(4*zeta(3)) = 1.1254908... . - Amiram Eldar, Nov 18 2022