# Fungrim entry: c24323

$\sum_{k=1}^{n} \operatorname{lcm}\!\left(n, k\right) = \frac{n}{2} \left(1 + \sum_{d \mid n} d \varphi(d)\right)$
Assumptions:$n \in \mathbb{Z}_{\ge 0}$
TeX:
\sum_{k=1}^{n} \operatorname{lcm}\!\left(n, k\right) = \frac{n}{2} \left(1 + \sum_{d \mid n} d \varphi(d)\right)

n \in \mathbb{Z}_{\ge 0}
Definitions:
Fungrim symbol Notation Short description
Sum$\sum_{n} f(n)$ Sum
LCM$\operatorname{lcm}\!\left(a, b\right)$ Least common multiple
DivisorSum$\sum_{k \mid n} f(k)$ Sum over divisors
Totient$\varphi(n)$ Euler totient function
ZZGreaterEqual$\mathbb{Z}_{\ge n}$ Integers greater than or equal to n
Source code for this entry:
Entry(ID("c24323"),
Formula(Equal(Sum(LCM(n, k), For(k, 1, n)), Mul(Div(n, 2), Add(1, DivisorSum(Mul(d, Totient(d)), For(d, n)))))),
Variables(n),
Assumptions(Element(n, ZZGreaterEqual(0))))

## Topics using this entry

Copyright (C) Fredrik Johansson and contributors. Fungrim is provided under the MIT license. The source code is on GitHub.

2020-08-27 09:56:25.682319 UTC