login
A360658
a(1) = 1; a(n) = -Sum_{k=2..n} k^3 * a(floor(n/k)).
4
1, -8, -35, -27, -152, 91, -252, -252, -252, 873, -458, -674, -2871, 216, 3591, 3591, -1322, -1322, -8181, -9181, 80, 12059, -108, -108, -108, 19665, 19665, 16921, -7468, -37843, -67634, -67634, -31697, 12520, 55395, 55395, 4742, 66473, 125792, 125792, 56871, -26478
OFFSET
1,2
LINKS
FORMULA
Sum_{k=1..n} k^3 * a(floor(n/k)) = 0 for n > 1.
G.f. A(x) satisfies x * (1 - x) = Sum_{k>=1} k^3 * (1 - x^k) * A(x^k).
MATHEMATICA
f[p_, e_] := If[e == 1, -p^3, 0]; f[2, e_] := Switch[e, 1, -9, 2, 8, _, 0]; s[1] = 1; s[n_] := Times @@ f @@@ FactorInteger[n]; Accumulate[Array[s, 100]] (* Amiram Eldar, May 10 2023 *)
PROG
(Python)
from functools import lru_cache
@lru_cache(maxsize=None)
def A360658(n):
if n <= 1:
return 1
c, j = 0, 2
k1 = n//j
while k1 > 1:
j2 = n//k1 + 1
c -= ((j2*(j2-1))**2-(j*(j-1))**2>>2)*A360658(k1)
j, k1 = j2, n//j2
return c-((n*(n+1))**2-((j-1)*j)**2>>2) # Chai Wah Wu, Apr 01 2023
CROSSREFS
Partial sums of A359531.
Cf. A336277.
Sequence in context: A158991 A265161 A303805 * A304852 A305249 A316549
KEYWORD
sign
AUTHOR
Seiichi Manyama, Apr 01 2023
STATUS
approved