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 A347030 #18 Apr 04 2023 17:05:08 %S A347030 1,2,1,3,2,1,0,4,4,3,2,0,-1,-2,-1,7,6,6,5,3,4,3,2,-2,-2,-3,-3,-5,-6, %T A347030 -5,-6,10,11,10,11,11,10,9,10,6,5,6,5,3,3,2,1,-7,-7,-7,-6,-8,-9,-9,-8, %U A347030 -12,-11,-12,-13,-11,-12,-13,-13,19,20,21,20,18,19,20,19,19,18,17,17 %N A347030 a(n) = 1 + Sum_{k=2..n} (-1)^k * a(floor(n/k)). %C A347030 Partial sums of A067856. %H A347030 Seiichi Manyama, <a href="/A347030/b347030.txt">Table of n, a(n) for n = 1..8191</a> %H A347030 Ilya Gutkovskiy, <a href="/A347030/a347030.jpg">Scatterplot of a(n) up to n=10000</a> %F A347030 G.f. A(x) satisfies: A(x) = (1/(1 - x)) * (x + Sum_{k>=2} (-1)^k * (1 - x^k) * A(x^k)). %t A347030 a[n_] := a[n] = 1 + Sum[(-1)^k a[Floor[n/k]], {k, 2, n}]; Table[a[n], {n, 1, 75}] %t A347030 nmax = 75; A[_] = 0; Do[A[x_] = (1/(1 - x)) (x + Sum[(-1)^k (1 - x^k) A[x^k], {k, 2, nmax}]) + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x] // Rest %o A347030 (Python) %o A347030 from functools import lru_cache %o A347030 @lru_cache(maxsize=None) %o A347030 def A347030(n): %o A347030 if n <= 1: %o A347030 return n %o A347030 c, j = 1, 2 %o A347030 k1 = n//j %o A347030 while k1 > 1: %o A347030 j2 = n//k1 + 1 %o A347030 c += (j2-j&1)*(-1 if j&1 else 1)*A347030(k1) %o A347030 j, k1 = j2, n//j2 %o A347030 return c+(n+1-j&1)*(-1 if j&1 else 1) # _Chai Wah Wu_, Apr 04 2023 %Y A347030 Cf. A002321, A025523, A067856, A309288, A347031. %K A347030 sign %O A347030 1,2 %A A347030 _Ilya Gutkovskiy_, Aug 11 2021