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 A174863 #63 Aug 19 2021 20:25:51 %S A174863 1,0,-1,-2,-3,-2,-3,-4,-5,-4,-5,-4,-5,-4,-3,-4,-5,-4,-5,-4,-3,-2,-3, %T A174863 -2,-3,-2,-3,-2,-3,-4,-5,-6,-5,-4,-3,-2,-3,-2,-1,0,-1,-2,-3,-2,-1,0, %U A174863 -1,0,-1,0,1,2,1,2,3,4,5,6,5,4,3,4,5,4,5,4,3,4,5,4,3,4,3,4,5,6,7 %N A174863 Little omega analog to Liouville's function L(n). %C A174863 Instead of using the Omega function, number of prime factors counted with multiplicity, this is using the omega function, number of distinct prime factors. %C A174863 Except for the two zeros and the intervening foray into negative territory shown here, the first thousand terms are all positive. The next zero occurs at term 7960. After the zero at term 12100, the function stays negative until term 22395666. %C A174863 This sequence and the Liouville sequence have some terms up to a(43) exactly the same. I don't know at what higher point (if any) that is the case again. [del Arte] %C A174863 It appears certain that this sequence and the Liouville sequence are equal infinitely often. Because they have the same parity and always change by one, they cannot cross without meeting. Both change signs infinitely often, and at apparently unrelated points. - _Franklin T. Adams-Watters_, Aug 05 2011 %H A174863 Reinhard Zumkeller, <a href="/A174863/b174863.txt">Table of n, a(n) for n = 1..10000</a> %H A174863 Michael J. Mossinghoff and Timothy S. Trudgian, <a href="https://arxiv.org/abs/1906.02847">A tale of two omegas</a>, arXiv:1906.02847 [math.NT], 2019. %H A174863 Wolfgang Schwarz, <a href="https://doi.org/10.1112/blms/4.2.136">A remark on multiplicative functions</a>, Bulletin of the London Mathematical Society, Vol. 4, No. 2 (1972), pp. 136-140; <a href="https://academic.oup.com/blms/article/4/2/136/267030">alternative link</a>. %H A174863 Jan van de Lune and Robert E. Dressler, <a href="https://doi.org/10.1515/crll.1975.277.117">Some theorems concerning the number theoretic function omega(n)</a>, Journal für die reine und angewandte Mathematik, Vol. 277 (1975), pp. 117-119; <a href="https://eudml.org/doc/151630">alternative link</a>. %F A174863 a(n) = Sum_{i = 1..n} (-1)^omega(i). %F A174863 A275547(a(n)) = 0. - _Alois P. Heinz_, Aug 03 2016 %F A174863 From _Ridouane Oudra_, Dec 31 2020: (Start) %F A174863 a(n) = Sum_{i=1..n} Sum_{j=1..n} mu(i*j)*floor(n/(i*j)); %F A174863 a(n) = Sum_{i=1..n} mu(i)*tau(i)*floor(n/i); %F A174863 a(n) = Sum_{i=1..n} 2^Omega(i)*mu(i)*floor(n/i), where Omega = A001222. (End) %F A174863 From _Amiram Eldar_, Mar 05 2021: (Start) %F A174863 a(n) ~ O(n * exp(-c*sqrt(log(n)))) (Schwarz, 1972). %F A174863 a(n) ~ o(n) (van de Lune and Dressler, 1975). (End) %F A174863 a(n) = 1 + Sum_{k>=1} (-1)^k * A346617(n,k). - _Alois P. Heinz_, Aug 19 2021 %e A174863 a(4) = -2 because: a(1) = 1, as 1 has an even number of prime factors; then 2 and 3 being prime, bring the running sum down to -1; and then 4, which has one distinct prime factor, brings the sum down to -2. (This is the first term that differs from the Mertens function and Liouville's function.) %t A174863 s=0; Table[s=s+(-1)^PrimeNu[n]; s, {n, 100}] (* PrimeNu is new in Mathematica 7.0 *) %o A174863 (PARI) a(n)=sum(k=1,n,(-1)^omega(k)) \\ _Charles R Greathouse IV_, Mar 27 2012 %o A174863 (PARI) a(n)=my(v=vectorsmall(n, i, 1)); forprime(p=2, n, forstep(i=p, n, p, v[i]*=-1)); sum(i=1, #v, v[i]) \\ _Charles R Greathouse IV_, Aug 21 2016 %o A174863 (Haskell) %o A174863 a174863 n = a174863_list !! (n-1) %o A174863 a174863_list = scanl1 (+) a076479_list %o A174863 -- _Reinhard Zumkeller_, Jun 01 2013 %o A174863 (Python) %o A174863 from sympy import primefactors %o A174863 def omega(n): return 0 if n==1 else len(primefactors(n)) %o A174863 def a(n): return sum([(-1)**omega(i) for i in range(1, n + 1)]) # _Indranil Ghosh_, May 20 2017 %Y A174863 Partial sums of A076479. - _Reinhard Zumkeller_, Jun 01 2013 %Y A174863 Cf. A002819 (Liouville's function), A002321 (Mertens's function), A275547 (where a(n) is zero). %Y A174863 Cf. A346617. %K A174863 sign %O A174863 1,4 %A A174863 _Alonso del Arte_, Dec 01 2010