A360658 a(1) = 1; a(n) = -Sum_{k=2..n} k^3 * a(floor(n/k)).
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
Keywords
Links
- Seiichi Manyama, Table of n, a(n) for n = 1..10000
Programs
-
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 *)
-
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
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).