OFFSET
1,3
COMMENTS
Row sums of triangle A143158. - Gary W. Adamson, Jul 27 2008
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
FORMULA
G.f. A(x) satisfies x = Sum_{k>=1} k * (1 - x^k) * A(x^k). - Seiichi Manyama, Apr 01 2023
Sum_{k=1..n} k * a(floor(n/k)) = 1. - Seiichi Manyama, Apr 03 2023
MAPLE
with(numtheory):
a:= proc(n) a(n):= mobius(n)*n +a(n-1) end: a(0):=0:
seq(a(n), n=1..100); # Alois P. Heinz, Oct 21 2012
MATHEMATICA
Table[Sum[MoebiusMu[k]k, {k, n}], {n, 60}] (* Harvey P. Dale, Feb 01 2012 *)
PROG
(Haskell)
a068340 n = a068340_list !! (n-1)
a068340_list = scanl1 (+) a055615_list
-- Reinhard Zumkeller, Sep 04 2015
(PARI) a(n) = sum(k=1, n, k*moebius(k)); \\ Michel Marcus, Jan 14 2023
(Python)
from functools import lru_cache
@lru_cache(maxsize=None)
def A068340(n):
if n <= 1:
return 1
c, j = 1, 2
k1 = n//j
while k1 > 1:
j2 = n//k1 + 1
c -= (j2*(j2-1)-j*(j-1)>>1)*A068340(k1)
j, k1 = j2, n//j2
return c-(n*(n+1)-(j-1)*j>>1) # Chai Wah Wu, Apr 04 2023
CROSSREFS
KEYWORD
sign
AUTHOR
Leroy Quet, Feb 27 2002
STATUS
approved