login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A068340 a(n) = Sum_{k=1..n} mu(k)*k, where mu(k) is the Moebius function. 17
1, -1, -4, -4, -9, -3, -10, -10, -10, 0, -11, -11, -24, -10, 5, 5, -12, -12, -31, -31, -10, 12, -11, -11, -11, 15, 15, 15, -14, -44, -75, -75, -42, -8, 27, 27, -10, 28, 67, 67, 26, -16, -59, -59, -59, -13, -60, -60, -60, -60, -9, -9, -62, -62, -7, -7, 50, 108, 49 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Row sums of triangle A143158. - Gary W. Adamson, Jul 27 2008
LINKS
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
Sequence in context: A115365 A263491 A272427 * A097667 A202388 A283919
KEYWORD
sign
AUTHOR
Leroy Quet, Feb 27 2002
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 23:15 EDT 2024. Contains 371798 sequences. (Running on oeis4.)