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.

A002819 Liouville's function L(n) = partial sums of A008836.

This page as a plain text file.
%I A002819 M0042 N0012 #89 Jun 04 2025 00:17:19
%S A002819 0,1,0,-1,0,-1,0,-1,-2,-1,0,-1,-2,-3,-2,-1,0,-1,-2,-3,-4,-3,-2,-3,-2,
%T A002819 -1,0,-1,-2,-3,-4,-5,-6,-5,-4,-3,-2,-3,-2,-1,0,-1,-2,-3,-4,-5,-4,-5,
%U A002819 -6,-5,-6,-5,-6,-7,-6,-5,-4,-3,-2,-3,-2,-3,-2,-3,-2,-1,-2,-3,-4,-3,-4,-5,-6,-7,-6,-7,-8,-7,-8,-9,-10,-9,-8,-9,-8,-7,-6
%N A002819 Liouville's function L(n) = partial sums of A008836.
%C A002819 Short history of conjecture L(n) <= 0 for all n >= 2 by Deborah Tepper Haimo. George Polya conjectured 1919 that L(n) <= 0 for all n >= 2. The conjecture was generally deemed true for nearly 40 years, until 1958, when C. B. Haselgrove proved that L(n) > 0 for infinitely many n. In 1962, R. S. Lehman found that L(906180359) = 1 and in 1980, M. Tanaka discovered that the smallest counterexample of the Polya conjecture occurs when n = 906150257. - Harri Ristiniemi (harri.ristiniemi(AT)nicf.), Jun 23 2001
%C A002819 Prime number theorem is equivalent to a(n)=o(n). - _Benoit Cloitre_, Feb 02 2003
%C A002819 All integers appear infinitely often in this sequence. - _Charles R Greathouse IV_, Aug 20 2016
%C A002819 In the Liouville function, every prime is assigned the value -1, so it may be expected that the values of a(n) are minimal (A360659) among all completely multiplicative sign functions. As it turns out, this is the case for n < 14 and n = 20. For any other n < 500 there exists a completely multiplicative sign function with a sum less than that of the Liouville function. Conjecture: A360659(n) < a(n) for n > 20. - _Bartlomiej Pawlik_, Mar 05 2023
%D A002819 H. Gupta, On a table of values of L(n), Proceedings of the Indian Academy of Sciences. Section A, 12 (1940), 407-409.
%D A002819 H. Gupta, A table of values of Liouville's function L(n), Research Bulletin of East Panjab University, No. 3 (Feb. 1950), 45-55.
%D A002819 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D A002819 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A002819 T. D. Noe, <a href="/A002819/b002819.txt">Table of n, a(n) for n = 0..10000</a>
%H A002819 Peter Borwein, Ron Ferguson, and Michael J. Mossinghoff, <a href="https://doi.org/10.1090/S0025-5718-08-02036-X">Sign changes in sums of the Liouville function</a>. Math. Comp. 77 (2008), 1681-1694.
%H A002819 Benoit Cloitre, <a href="http://arxiv.org/abs/1107.0812">A tauberian approach to RH</a>, arXiv preprint arXiv:1107.0812 [math.NT], 2011-2017.
%H A002819 H. Gupta, <a href="/A002053/a002053.pdf">On a table of values of L(n)</a>, Proceedings of the Indian Academy of Sciences. Section A, 12 (1940), 407-409. [Annotated scanned copy]
%H A002819 H. Gupta, <a href="/A002053/a002053.pdf">On a table of values of L(n)</a>, Proceedings of the Indian Academy of Sciences. Section A, 12 (1940), 407-409. [Annotated scanned copy]
%H A002819 D. T. Haimo, <a href="http://www.jstor.org/stable/2975344">Experimentation and Conjecture Are Not Enough</a>, The American Mathematical Monthly Volume 102 Number 2, 1995, page 105.
%H A002819 R. S. Lehman, <a href="http://dx.doi.org/10.1090/S0025-5718-1960-0120198-5">On Liouville's function</a>, Math. Comp., 14 (1960), 311-320.
%H A002819 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 A002819 Ben Sparks, <a href="https://www.youtube.com/watch?v=eQCUPQdi6DY">906,150,257 and the Pólya conjecture (MegaFavNumbers)</a>, SparksMath video (2020)
%H A002819 M. Tanaka, <a href="http://dx.doi.org/10.3836/tjm/1270216093">A Numerical Investigation on Cumulative Sum of the Liouville Function</a>, Tokyo J. Math. 3, 187-189, 1980.
%H A002819 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/LiouvilleFunction.html">Liouville Function</a>
%F A002819 a(n) = determinant of A174856. - _Mats Granvik_, Mar 31 2010
%F A002819 a(n) = Sum_{k=1..floor(sqrt(n))} A002321(floor(n / k^2)). - _Daniel Suteu_, May 30 2025
%p A002819 A002819 := n -> add((-1)^numtheory[bigomega](i),i=1..n): # _Peter Luschny_, Sep 15 2011
%t A002819 Accumulate[Join[{0},LiouvilleLambda[Range[90]]]] (* _Harvey P. Dale_, Nov 08 2011 *)
%o A002819 (PARI) a(n)=sum(i=1,n,(-1)^bigomega(i))
%o A002819 (PARI) a(n)=my(v=vectorsmall(n,i,1)); forprime(p=2,sqrtint(n), for(e=2,logint(n,p), forstep(i=p^e, n, p^e, v[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 20 2016
%o A002819 (Haskell)
%o A002819 a002819 n = a002819_list !! n
%o A002819 a002819_list = scanl (+) 0 a008836_list
%o A002819 -- _Reinhard Zumkeller_, Nov 19 2011
%o A002819 (Python)
%o A002819 from functools import reduce
%o A002819 from operator import ixor
%o A002819 from sympy import factorint
%o A002819 def A002819(n): return sum(-1 if reduce(ixor, factorint(i).values(),0)&1 else 1 for i in range(1,n+1)) # _Chai Wah Wu_, Dec 19 2022
%Y A002819 Cf. A008836, A002053, A028488, A239122, A360659.
%K A002819 nice,sign
%O A002819 0,9
%A A002819 _N. J. A. Sloane_
%E A002819 More terms from Larry Reeves (larryr(AT)acm.org), Jul 09 2001