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 A369180 #29 Jan 23 2025 13:05:19 %S A369180 0,1,-1,3,-1,1,-1,5,-3,1,-1,4,-1,1,-3,8,-1,0,-1,4,-3,1,-1,7,-3,1,-5,4, %T A369180 -1,1,-1,10,-3,1,-3,5,-1,1,-3,7,-1,1,-1,4,-6,1,-1,11,-3,0,-3,4,-1,-1, %U A369180 -3,7,-3,1,-1,6,-1,1,-6,14,-3,1,-1,4,-3,1,-1,9,-1,1,-6,4,-3,1 %N A369180 Alternating sum of the k-adic valuations (ruler functions) of n. %H A369180 Alois P. Heinz, <a href="/A369180/b369180.txt">Table of n, a(n) for n = 1..20000</a> %F A369180 a(n) = Sum_{k=2..n} (-1)^k * valuation(n,k). %F A369180 a(n) = A007814(n) - A007949(n) + A235127(n) - (...). %F A369180 G.f.: Sum_{k>=2, j>=1} (-1)^k x^(k^j)/(1-x^(k^j)). %F A369180 Asymptotic mean: lim_{m->oo} (1/m) * Sum_{n=1..m} a(n) = log(2). %F A369180 Dirichlet g.f.: zeta(s) * Sum_{k>=1} (1 - eta(ks)). %F A369180 Sum_{n>=1} a(n)/n^2 = Pi^2/24. %p A369180 a:= n-> add((-1)^i*padic[ordp](n, i), i=2..n): %p A369180 seq(a(n), n=1..78); # _Alois P. Heinz_, Jan 15 2024 %t A369180 z = 70; Sum[(-1)^k IntegerExponent[Range[z], k], {k, 2, z}] %o A369180 (PARI) a(n) = sum(k=2, n, (-1)^k * valuation(n,k)); \\ _Michel Marcus_, Jan 18 2024 %o A369180 (PARI) a(n)=sumdiv(n,k, if(k>1, (-1)^k * valuation(n, k))) \\ _Charles R Greathouse IV_, Jan 23 2025 %Y A369180 Cf. A007814, A007949, A222171, A235127, A309891. %K A369180 sign %O A369180 1,4 %A A369180 _Friedjof Tellkamp_, Jan 15 2024