login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A332468
a(n) = Sum_{k=1..n} mu(k) * floor(n/k)^n.
4
1, 3, 25, 239, 3091, 45863, 821227, 16711423, 387138661, 9990174303, 285262663291, 8913906888703, 302861978789371, 11111328334033327, 437889112287422401, 18446462446101903615, 827238009323454485641, 39346257879101283645743, 1978418304199236175597105
OFFSET
1,2
LINKS
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
def A332468(n): return A344527_T(n, n) # Chai Wah Wu, Nov 02 2023
CROSSREFS
Main diagonal of A344527.
Sequence in context: A066221 A370280 A367786 * A134272 A335117 A346539
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 13 2020
STATUS
approved