login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A360390
a(1) = 1; a(n) = -Sum_{k=2..n} k^2 * a(floor(n/k)).
6
1, -4, -13, -9, -34, 11, -38, -38, -38, 87, -34, -70, -239, 6, 231, 231, -58, -58, -419, -519, -78, 527, -2, -2, -2, 843, 843, 647, -194, -1319, -2280, -2280, -1191, 254, 1479, 1479, 110, 1915, 3436, 3436, 1755, -450, -2299, -2783, -2783, -138, -2347, -2347, -2347, -2347, 254, -422
OFFSET
1,2
LINKS
FORMULA
Sum_{k=1..n} k^2 * a(floor(n/k)) = 0 for n > 1.
G.f. A(x) satisfies x * (1 - x) = Sum_{k>=1} k^2 * (1 - x^k) * A(x^k).
MATHEMATICA
f[p_, e_] := If[e == 1, -p^2, 0]; f[2, e_] := Switch[e, 1, -5, 2, 4, _, 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 A360390(n):
if n <= 1:
return 1
c, j = 0, 2
k1 = n//j
while k1 > 1:
j2 = n//k1 + 1
c -= (j2*(j2-1)*((j2<<1)-1)-j*(j-1)*((j<<1)-1))//6*A360390(k1)
j, k1 = j2, n//j2
return c-(n*(n+1)*((n<<1)+1)-j*(j-1)*((j<<1)-1))//6 # Chai Wah Wu, Apr 01 2023
CROSSREFS
Partial sums of A359485.
Cf. A336276.
Sequence in context: A264341 A356799 A144290 * A101181 A160249 A173800
KEYWORD
sign
AUTHOR
Seiichi Manyama, Apr 01 2023
STATUS
approved