cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A359478 a(1) = 1; a(n) = -Sum_{k=2..n} k * a(floor(n/k)).

This page as a plain text file.
%I A359478 #30 May 10 2023 04:30:49
%S A359478 1,-2,-5,-3,-8,1,-6,-6,-6,9,-2,-8,-21,0,15,15,-2,-2,-21,-31,-10,23,0,
%T A359478 0,0,39,39,25,-4,-49,-80,-80,-47,4,39,39,2,59,98,98,57,-6,-49,-71,-71,
%U A359478 -2,-49,-49,-49,-49,2,-24,-77,-77,-22,-22,35,122,63,93,32,125,125,125,190,91
%N A359478 a(1) = 1; a(n) = -Sum_{k=2..n} k * a(floor(n/k)).
%H A359478 Seiichi Manyama, <a href="/A359478/b359478.txt">Table of n, a(n) for n = 1..10000</a>
%F A359478 Sum_{k=1..n} k * a(floor(n/k)) = 0 for n > 1.
%F A359478 G.f. A(x) satisfies x * (1 - x) = Sum_{k>=1} k * (1 - x^k) * A(x^k).
%t A359478 s[n_] := n * MoebiusMu[n] - If[OddQ[n], 0, MoebiusMu[n/2]*n/2]; Accumulate[Array[s, 100]] (* _Amiram Eldar_, May 09 2023 *)
%o A359478 (Python)
%o A359478 from functools import lru_cache
%o A359478 @lru_cache(maxsize=None)
%o A359478 def A359478(n):
%o A359478     if n <= 1:
%o A359478         return 1
%o A359478     c, j = 0, 2
%o A359478     k1 = n//j
%o A359478     while k1 > 1:
%o A359478         j2 = n//k1 + 1
%o A359478         c -= (j2*(j2-1)-j*(j-1)>>1)*A359478(k1)
%o A359478         j, k1 = j2, n//j2
%o A359478     return c-(n*(n+1)-(j-1)*j>>1) # _Chai Wah Wu_, Mar 31 2023
%Y A359478 Partial sums of A359484.
%Y A359478 Cf. A092149, A360390, A360658.
%Y A359478 Cf. A359479.
%K A359478 sign,look
%O A359478 1,2
%A A359478 _Seiichi Manyama_, Mar 31 2023