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.

A332618 a(n) = Sum_{d|n} lcm(d, n/d) / gcd(d, n/d).

Original entry on oeis.org

1, 4, 6, 9, 10, 24, 14, 20, 19, 40, 22, 54, 26, 56, 60, 41, 34, 76, 38, 90, 84, 88, 46, 120, 51, 104, 60, 126, 58, 240, 62, 84, 132, 136, 140, 171, 74, 152, 156, 200, 82, 336, 86, 198, 190, 184, 94, 246, 99, 204, 204, 234, 106, 240, 220, 280, 228, 232, 118, 540
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 17 2020

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> n*add(1/igcd(d, n/d)^2, d=numtheory[divisors](n)):
    seq(a(n), n=1..80);  # Alois P. Heinz, Feb 17 2020
  • Mathematica
    Table[Sum[LCM[d, n/d]/GCD[d, n/d], {d, Divisors[n]}], {n, 1, 60}]
    f[p_, e_] := If[EvenQ[e], (2*p^(e+2) - p^2 - 1)/(p^2 - 1), 2*(p^(e+2) - p)/(p^2 - 1)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Dec 05 2022 *)
  • PARI
    A332618(n) = sumdiv(n,d,lcm(d,n/d)/gcd(d,n/d)); \\ Antti Karttunen, Nov 12 2021

Formula

a(n) = n * Sum_{d|n} 1 / gcd(d, n/d)^2.
Multiplicative with a(p^e) = (2*p^(e+2) - p^2 - 1)/(p^2 - 1) if e is even, a(p^e) = 2*(p^(e+2) - p)/(p^2 - 1) if e is odd. - Sebastian Karlsson, May 07 2022
From Peter Bala, Jan 24 2024: (Start)
a(n) = Sum_{d divides n} A007913(d)*n/d.
Dirichlet g.f.: zeta(2*s)*zeta(s-1)^2/zeta(2*s-2). (End)