login
A359478
a(1) = 1; a(n) = -Sum_{k=2..n} k * a(floor(n/k)).
5
1, -2, -5, -3, -8, 1, -6, -6, -6, 9, -2, -8, -21, 0, 15, 15, -2, -2, -21, -31, -10, 23, 0, 0, 0, 39, 39, 25, -4, -49, -80, -80, -47, 4, 39, 39, 2, 59, 98, 98, 57, -6, -49, -71, -71, -2, -49, -49, -49, -49, 2, -24, -77, -77, -22, -22, 35, 122, 63, 93, 32, 125, 125, 125, 190, 91
OFFSET
1,2
LINKS
FORMULA
Sum_{k=1..n} k * a(floor(n/k)) = 0 for n > 1.
G.f. A(x) satisfies x * (1 - x) = Sum_{k>=1} k * (1 - x^k) * A(x^k).
MATHEMATICA
s[n_] := n * MoebiusMu[n] - If[OddQ[n], 0, MoebiusMu[n/2]*n/2]; Accumulate[Array[s, 100]] (* Amiram Eldar, May 09 2023 *)
PROG
(Python)
from functools import lru_cache
@lru_cache(maxsize=None)
def A359478(n):
if n <= 1:
return 1
c, j = 0, 2
k1 = n//j
while k1 > 1:
j2 = n//k1 + 1
c -= (j2*(j2-1)-j*(j-1)>>1)*A359478(k1)
j, k1 = j2, n//j2
return c-(n*(n+1)-(j-1)*j>>1) # Chai Wah Wu, Mar 31 2023
CROSSREFS
Partial sums of A359484.
Cf. A359479.
Sequence in context: A331217 A021398 A186631 * A182184 A115318 A338060
KEYWORD
sign,look
AUTHOR
Seiichi Manyama, Mar 31 2023
STATUS
approved