OFFSET
1,2
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..386
FORMULA
a(n) ~ n^n. - Vaclav Kotesovec, May 28 2021
MATHEMATICA
Table[Sum[MoebiusMu[k] Floor[n/k]^n, {k, 1, n}], {n, 1, 19}]
b[n_, k_] := b[n, k] = n^k - Sum[b[Floor[n/j], k], {j, 2, n}]; a[n_] := b[n, n]; Table[a[n], {n, 1, 19}]
PROG
(PARI) a(n)={sum(k=1, n, moebius(k) * floor(n/k)^n)} \\ Andrew Howroyd, Feb 13 2020
(Magma) [&+[MoebiusMu(k)*Floor(n/k)^n:k in [1..n]]:n in [1..20]]; // Marius A. Burtea, Feb 13 2020
(Python)
from functools import lru_cache
@lru_cache(maxsize=None)
def A344527_T(n, k):
if n == 0:
return 0
c, j, k1 = 1, 2, n//2
while k1 > 1:
j2 = n//k1 + 1
c += (j2-j)*A344527_T(k1, k)
j, k1 = j2, n//j2
return n*(n**(k-1)-1)-c+j
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 13 2020
STATUS
approved