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.
%I A361983 #21 May 10 2023 04:31:24 %S A361983 1,5,-4,28,3,-33,-82,174,174,74,-47,-335,-504,-700,-475,1573,1284, %T A361983 1284,923,123,564,80,-449,-2753,-2753,-3429,-3429,-4997,-5838,-4938, %U A361983 -5899,10485,11574,10418,11643,11643,10274,8830,10351,3951,2270,4034,2185,-1687,-1687,-3803 %N A361983 a(n) = 1 + Sum_{k=2..n} (-1)^k * k^2 * a(floor(n/k)). %H A361983 Seiichi Manyama, <a href="/A361983/b361983.txt">Table of n, a(n) for n = 1..8191</a> %F A361983 Sum_{k=1..n} (-1)^k * k^2 * a(floor(n/k)) = -1. %F A361983 G.f. A(x) satisfies -x = Sum_{k>=1} (-1)^k * k^2 * (1 - x^k) * A(x^k). %t A361983 f[p_, e_] := If[e == 1, -p^2, 0]; f[2, e_] := 2^(3*e - 1); s[1] = 1; s[n_] := Times @@ f @@@ FactorInteger[n]; Accumulate[Array[s, 100]] (* _Amiram Eldar_, May 09 2023 *) %o A361983 (Python) %o A361983 from functools import lru_cache %o A361983 @lru_cache(maxsize=None) %o A361983 def A361983(n): %o A361983 if n <= 1: %o A361983 return 1 %o A361983 c, j = 1, 2 %o A361983 k1 = n//j %o A361983 while k1 > 1: %o A361983 j2 = n//k1 + 1 %o A361983 c += ((j2*(j2-1) if j2&1 else -j2*(j2-1))+(-j*(j-1) if j&1 else j*(j-1))>>1)*A361983(k1) %o A361983 j, k1 = j2, n//j2 %o A361983 return c+((-n*(n+1) if n&1 else n*(n+1))+(-j*(j-1) if j&1 else j*(j-1))>>1) # _Chai Wah Wu_, Apr 02 2023 %Y A361983 Partial sums of A361987. %Y A361983 Cf. A347030, A361982. %Y A361983 Cf. A336276. %K A361983 sign,look %O A361983 1,2 %A A361983 _Seiichi Manyama_, Apr 02 2023