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.

Showing 1-10 of 30 results. Next

A028488 Numbers k such that the summatory Liouville function L(k) (A002819) is zero.

Original entry on oeis.org

2, 4, 6, 10, 16, 26, 40, 96, 586, 906150256, 906150294, 906150308, 906150310, 906150314, 906151516, 906151576, 906152172, 906154582, 906154586, 906154590, 906154594, 906154604, 906154606, 906154608, 906154758, 906154760, 906154762
Offset: 1

Views

Author

Keywords

Comments

a(253) > 2*10^14 according to the calculations of Borwein, Ferguson, & Mossinghoff. Most likely a(253) = 351100332278250. - Charles R Greathouse IV, Jun 14 2011
L(23156358837978983978) = 0 and L(k) < 0 for k from 2.3156354*10^19 to 23156358837978983977. - Hiroaki Yamanouchi, Oct 03 2015
All terms are even since k and A002819(k) have the same parity. - Jianing Song, Aug 06 2021
According to Pólya, numbers (p-3)/4 are members of this sequence, with p a Heegner number > 7 (that is, p is one of 11, 19, 43, 67, and 163). - Friedjof Tellkamp, Feb 15 2025

Crossrefs

Cf. A008836 (Liouville's function), A002819, A051470.
Cf. A003173 (Heegner numbers).

Programs

  • Maple
    B:= [seq((-1)^numtheory:-bigomega(i),i=1..10^5)]:
    L:= ListTools:-PartialSums(B):
    select(t -> L[t]=0, [$1..10^5]); # Robert Israel, Aug 27 2015
  • Mathematica
    Position[Table[Sum[LiouvilleLambda@ k, {k, 1, n}], {n, 1000}], n_ /; n == 0] // Flatten (* Michael De Vlieger, Aug 27 2015 *)
    Position[Accumulate[LiouvilleLambda[Range[1000]]],0]//Flatten (* Harvey P. Dale, Aug 10 2022 *)

Extensions

More terms from Hans Havermann, Jun 24 2002

A002053 a(n) = least value of m for which Liouville's function A002819(m) = -n.

Original entry on oeis.org

2, 3, 8, 13, 20, 31, 32, 53, 76, 79, 80, 117, 176, 181, 182, 193, 200, 283, 284, 285, 286, 293, 440, 443, 468, 661, 678, 683, 684, 1075, 1076, 1087, 1088, 1091, 1092, 1093, 1106, 1109, 1128, 1129, 1130, 1131, 1132, 1637, 1638, 1753, 1756, 1759, 1760, 2699
Offset: 0

Views

Author

Keywords

Comments

Also when n first appears in A072203(m).

References

  • H. Gupta, On a table of values of L(n), Proceedings of the Indian Academy of Sciences. Section A, 12 (1940), 407-409.
  • H. Gupta, A table of values of Liouville's function L(n), Research Bulletin of East Panjab University, No. 3 (Feb. 1950), 45-55.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    f[n_] := f[n] = f[n - 1] -(-1)^Length[Flatten[Table[ #[[1]], {#[[2]]}] & /@ FactorInteger[n]]]; f[1] = 0; Do[k = 1; While[f[k] != n, k++ ]; Print[k], {n, 1, 50}]
  • Python
    from functools import reduce
    from operator import ixor
    from itertools import count
    from sympy import factorint
    def A002053(n): return next(filter(lambda m:-n==sum(-1 if reduce(ixor, factorint(i).values(),0)&1 else 1 for i in range(1,m+1)),count(1))) # Chai Wah Wu, Jan 01 2023

Extensions

More terms from Jud McCranie

A189229 Counterexamples to Polya's conjecture that A002819(n) <= 0 if n > 1.

Original entry on oeis.org

906150257, 906150258, 906150259, 906150260, 906150261, 906150262, 906150263, 906150264, 906150265, 906150266, 906150267, 906150268, 906150269, 906150270, 906150271, 906150272, 906150273, 906150274, 906150275, 906150276, 906150277, 906150278, 906150279, 906150280
Offset: 1

Views

Author

Jonathan Sondow, Jun 13 2011

Keywords

Comments

The point is that for all x < 906150257 there are more n <= x with Omega(n) odd than with Omega(n) even. At x = 906150257 the evens go ahead for the first time. - N. J. A. Sloane, Feb 10 2022
906150294 is the smallest number > 906150257 that is not in the sequence (see A028488).
See A002819, A008836, A028488, A051470 for additional comments, references, and links.
See Brent and van de Lune (2011) for a history of Polya's conjecture and a proof that it is true "on average" in a certain precise sense.

Examples

			906150257 is the smallest number k > 1 with A002819(k) > 0 (see Tanaka 1980).
		

References

  • Barry Mazur and William Stein, Prime Numbers and the Riemann Hypothesis, Cambridge University Press, 2016. See p. 22.

Crossrefs

Cf. A002819 (Liouville's summatory function L(n)), A008836 (Liouville's function lambda(n)), A028488 (n such that L(n) = 0), A051470 (least m for which L(m) = n).

Programs

  • PARI
    s=1; c=0; for(n=2, 906188859, s=s+(-1)^bigomega(n); if(s>0, c++; write("b189229.txt", c " " n))) /* Donovan Johnson, Apr 25 2013 */

Formula

{ k : (k-1)*A002819(k) > 0. }

A224987 Numbers such that Liouville's function (A002819) and the little omega analog to Liouville's function (A174863) are equal.

Original entry on oeis.org

1, 2, 3, 20, 21, 22, 23, 24, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 13092, 13093, 13094, 13095, 13096, 13097, 13098, 13099, 13100, 13101, 13102, 13103, 13104, 13105, 13106, 13107, 13232, 13233, 13234, 13235, 13239, 13240, 13241, 13242
Offset: 1

Views

Author

Donovan Johnson, Apr 22 2013

Keywords

Comments

Numbers n such that A002819(n) = A174863(n). There are 9056 terms <= 10^12 (the largest is 16959554). For n from 16959555 to 10^12, A002819(n) < A174863(n).

Examples

			n = 43:
A002819(n) = sum_{k = 1..n} (-1)^bigomega(k) = -3.
A174863(n) = sum_{k = 1..n} (-1)^omega(k) = -3.
A002819(43) = A174863(43) = -3.
		

Crossrefs

Programs

  • Mathematica
    PrimeOmega[n_] := Plus @@ FactorInteger[n][[All, 2]]; PrimeNu[n_] := Length[FactorInteger[n]]; Reap[For[s1 = 0; s2 = 0; n = 1, n < 15000, n++, s1 = s1 + (-1)^PrimeOmega[n]; s2 = s2 + (-1)^PrimeNu[n]; If[s1 == s2, Print[n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, May 03 2013, after Pari *)
  • PARI
    s1=0; s2=0; c=0; for(n=1, 16959554, s1=s1+(-1)^bigomega(n); s2=s2+(-1)^omega(n); if(s1==s2, c++; write("b224987.txt", c " " n)))

A249482 Numbers n such that the summatory Liouville function L(n) (A002819) is zero and L(n-1)*L(n+1) = -1.

Original entry on oeis.org

2, 906150256, 906150308, 906150310, 906151576, 906154582, 906154586, 906154604, 906154606, 906154608, 906154758, 906154762, 906154764, 906154768, 906154770, 906154788, 906154794, 906154824, 906154826, 906154828, 906154830, 906154836, 906154838, 906154856
Offset: 1

Views

Author

Vladimir Shevelev, Jan 13 2015

Keywords

Comments

To create the data, the author studied the b-file of Donovan Johnson in A189229.
For k>=1,
in the interval [a(2k-1), a(2k)], L(n)<=0,
in the interval [a(2k), a(2k+1)], L(n)>=0.
In particular, for k=1, in the interval [2, 906150256], L(n)<=0.
G. Polya (1919) conjectured that L(n)<=0, for n>=2. But this was disproved in 1958 by B. Haselgrove, and in 1980 M. Tanaka found the smallest counterexample, a(2)+1 = 906150257.

Crossrefs

A000720 pi(n), the number of primes <= n. Sometimes called PrimePi(n) to distinguish it from the number 3.14159...

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 21, 21, 21, 21, 21, 21
Offset: 1

Views

Author

Keywords

Comments

Partial sums of A010051 (characteristic function of primes). - Jeremy Gardiner, Aug 13 2002
pi(n) and prime(n) are inverse functions: a(A000040(n)) = n and A000040(n) is the least number m such that A000040(a(m)) = A000040(n). A000040(a(n)) = n if (and only if) n is prime. - Jonathan Sondow, Dec 27 2004
See the additional references and links mentioned in A143227. - Jonathan Sondow, Aug 03 2008
A lower bound that gets better with larger N is that there are at least T prime numbers less than N, where the recursive function T is: T = N - N*Sum_{i=0..T(sqrt(N))} A005867(i)/A002110(i). - Ben Paul Thurston, Aug 23 2010
Number of partitions of 2n into exactly two parts with the smallest part prime. - Wesley Ivan Hurt, Jul 20 2013
Equivalent to the Riemann hypothesis: abs(a(n) - li(n)) < sqrt(n)*log(n)/(8*Pi), for n >= 2657, where li(n) is the logarithmic integral (Lowell Schoenfeld). - Ilya Gutkovskiy, Jul 05 2016
The second Hardy-Littlewood conjecture, that pi(x) + pi(y) >= pi(x + y) for integers x and y with min{x, y} >= 2, is known to hold for (x, y) sufficiently large (Udrescu 1975). - Peter Luschny, Jan 12 2021

Examples

			There are 3 primes <= 6, namely 2, 3 and 5, so pi(6) = 3.
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, p. 8.
  • Raymond Ayoub, An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963; p. 129.
  • Florian Cajori, A History of Mathematical Notations, Dover edition (2012), par. 409.
  • Richard Crandall and Carl Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see p. 5.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, Theorems 6, 7, 420.
  • G. J. O. Jameson, The Prime Number Theorem, Camb. Univ. Press, 2003. [See also the review by D. M. Bressoud (link below).]
  • Władysław Narkiewicz, The Development of Prime Number Theory, Springer-Verlag, 2000.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 132-133, 157-184.
  • József Sándor, Dragoslav S. Mitrinovic and Borislav Crstici, Handbook of Number Theory I, Springer Science & Business Media, 2005, Section VII.1. (For inequalities, etc.).
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Gerald Tenenbaum and Michel Mendès France, Prime Numbers and Their Distribution, AMS Providence RI, 1999.
  • V. Udrescu, Some remarks concerning the conjecture pi(x + y) <= pi(x) + pi(y), Rev. Roumaine Math. Pures Appl. 20 (1975), 1201-1208.

Crossrefs

Closely related:
A099802: Number of primes <= 2n.
A060715: Number of primes between n and 2n (exclusive).
A035250: Number of primes between n and 2n (inclusive).
A038107: Number of primes < n^2.
A014085: Number of primes between n^2 and (n+1)^2.
A007053: Number of primes <= 2^n.
A036378: Number of primes p between powers of 2, 2^n < p <= 2^(n+1).
A006880: Number of primes < 10^n.
A006879: Number of primes with n digits.
A033270: Number of odd primes <= n.
A065855: Number of composites <= n.
For lists of large values of a(n) see, e.g., A005669(n) = a(A002386(n)), A214935(n) = a(A205827(n)).
Related sequences:
Primes (p) and composites (c): A000040, A002808, A065855.
Primes between p(n) and 2*p(n): A063124, A070046; between c(n) and 2*c(n): A376761; between n and 2*n: A035250, A060715, A077463, A108954.
Composites between p(n) and 2*p(n): A246514; between c(n) and 2*c(n): A376760; between n and 2*n: A075084, A307912, A307989, A376759.

Programs

  • Haskell
    a000720 n = a000720_list !! (n-1)
    a000720_list = scanl1 (+) a010051_list  -- Reinhard Zumkeller, Sep 15 2011
    
  • Magma
    [ #PrimesUpTo(n): n in [1..200] ];  // Bruno Berselli, Jul 06 2011
    
  • Maple
    with(numtheory); A000720 := pi; [ seq(A000720(i),i=1..50) ];
  • Mathematica
    A000720[n_] := PrimePi[n]; Table[ A000720[n], {n, 1, 100} ]
    Array[ PrimePi[ # ]&, 100 ]
    Accumulate[Table[Boole[PrimeQ[n]],{n,100}]] (* Harvey P. Dale, Jan 17 2015 *)
  • PARI
    A000720=vector(100,n,omega(n!)) \\ For illustration only; better use A000720=primepi
    
  • PARI
    vector(300,j,primepi(j)) \\ Joerg Arndt, May 09 2008
    
  • Python
    from sympy import primepi
    for n in range(1,100): print(primepi(n), end=', ') # Stefano Spezia, Nov 30 2018
  • Sage
    [prime_pi(n) for n in range(1, 79)]  # Zerinvary Lajos, Jun 06 2009
    

Formula

The prime number theorem gives the asymptotic expression a(n) ~ n/log(n).
For x > 1, pi(x) < (x / log x) * (1 + 3/(2 log x)). For x >= 59, pi(x) > (x / log x) * (1 + 1/(2 log x)). [Rosser and Schoenfeld]
For x >= 355991, pi(x) < (x / log(x)) * (1 + 1/log(x) + 2.51/(log(x))^2 ). For x >= 599, pi(x) > (x / log(x)) * (1 + 1/log(x)). [Dusart]
For x >= 55, x/(log(x) + 2) < pi(x) < x/(log(x) - 4). [Rosser]
For n > 1, A138194(n) <= a(n) <= A138195(n) (Tschebyscheff, 1850). - Reinhard Zumkeller, Mar 04 2008
For n >= 33, a(n) = 1 + Sum_{j=3..n} ((j-2)! - j*floor((j-2)!/j)) (Hardy and Wright); for n >= 1, a(n) = n - 1 + Sum_{j=2..n} (floor((2 - Sum_{i=1..j} (floor(j/i)-floor((j-1)/i)))/j)) (Ruiz and Sondow 2000). - Benoit Cloitre, Aug 31 2003
a(n) = A001221(A000142(n)). - Benoit Cloitre, Jun 03 2005
G.f.: Sum_{p prime} x^p/(1-x) = b(x)/(1-x), where b(x) is the g.f. for A010051. - Franklin T. Adams-Watters, Jun 15 2006
a(n) = A036234(n) - 1. - Jaroslav Krizek, Mar 23 2009
From Enrique Pérez Herrero, Jul 12 2010: (Start)
a(n) = Sum_{i=2..n} floor((i+1)/A000203(i)).
a(n) = Sum_{i=2..n} floor(A000010(n)/(i-1)).
a(n) = Sum_{i=2..n} floor(2/A000005(n)). (End)
Let pf(n) denote the set of prime factors of an integer n. Then a(n) = card(pf(n!/floor(n/2)!)). - Peter Luschny, Mar 13 2011
a(n) = -Sum_{p <= n} mu(p). - Wesley Ivan Hurt, Jan 04 2013
a(n) = (1/2)*Sum_{p <= n} (mu(p)*d(p)*sigma(p)*phi(p)) + sum_{p <= n} p^2. - Wesley Ivan Hurt, Jan 04 2013
a(1) = 0 and then, for all k >= 1, repeat k A001223(k) times. - Jean-Christophe Hervé, Oct 29 2013
a(n) = n/(log(n) - 1 - Sum_{k=1..m} A233824(k)/log(n)^k + O(1/log(n)^{m+1})) for m > 0. - Jonathan Sondow, Dec 19 2013
a(n) = A001221(A003418(n)). - Eric Desbiaux, May 01 2014
a(n) = Sum_{j=2..n} H(-sin^2 (Pi*(Gamma(j)+1)/j)) where H(x) is the Heaviside step function, taking H(0)=1. - Keshav Raghavan, Jun 18 2016
a(A014076(n)) = (1/2) * (A014076(n) + 1) - n + 1. - Christopher Heiling, Mar 03 2017
From Steven Foster Clark, Sep 25 2018: (Start)
a(n) = Sum_{m=1..n} A143519(m) * floor(n/m).
a(n) = Sum_{m=1..n} A001221(m) * A002321(floor(n/m)) where A002321() is the Mertens function.
a(n) = Sum_{m=1..n} |A143519(m)| * A002819(floor(n/m)) where A002819() is the Liouville Lambda summatory function and |x| is the absolute value of x.
a(n) = Sum_{m=1..n} A137851(m)/m * H(floor(n/m)) where H(n) = Sum_{m=1..n} 1/m is the harmonic number function.
a(n) = Sum_{m=1..log_2(n)} A008683(m) * A025528(floor(n^(1/m))) where A008683() is the Moebius mu function and A025528() is the prime-power counting function.
(End)
Sum_{k=2..n} 1/a(k) ~ (1/2) * log(n)^2 + O(log(n)) (de Koninck and Ivić, 1980). - Amiram Eldar, Mar 08 2021
a(n) ~ 1/(n^(1/n)-1). - Thomas Ordowski, Jan 30 2023
a(n) = Sum_{j=2..n} floor(((j - 1)! + 1)/j - floor((j - 1)!/j)) [Mináč, unpublished] (see Ribenboim, pp. 132-133). - Stefano Spezia, Apr 13 2025
a(n) = n - 1 - Sum_{k=2..floor(log_2(n))} pi_k(n), where pi_k(n) is the number of k-almost primes <= n. - Daniel Suteu, Aug 27 2025

Extensions

Additional links contributed by Lekraj Beedassy, Dec 23 2003
Edited by M. F. Hasler, Apr 27 2018 and (links recovered) Dec 21 2018

A008836 Liouville's function lambda(n) = (-1)^k, where k is number of primes dividing n (counted with multiplicity).

Original entry on oeis.org

1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1
Offset: 1

Views

Author

Keywords

Comments

Coons and Borwein: "We give a new proof of Fatou's theorem: if an algebraic function has a power series expansion with bounded integer coefficients, then it must be a rational function. This result is applied to show that for any non-trivial completely multiplicative function from N to {-1,1}, the series sum_{n=1..infinity} f(n)z^n is transcendental over {Z}[z]; in particular, sum_{n=1..infinity} lambda(n)z^n is transcendental, where lambda is Liouville's function. The transcendence of sum_{n=1..infinity} mu(n)z^n is also proved." - Jonathan Vos Post, Jun 11 2008
Coons proves that a(n) is not k-automatic for any k > 2. - Jonathan Vos Post, Oct 22 2008
The Riemann hypothesis is equivalent to the statement that for every fixed epsilon > 0, lim_{n -> infinity} (a(1) + a(2) + ... + a(n))/n^(1/2 + epsilon) = 0 (Borwein et al., theorem 1.2). - Arkadiusz Wesolowski, Oct 08 2013

Examples

			a(4) = 1 because since bigomega(4) = 2 (the prime divisor 2 is counted twice), then (-1)^2 = 1.
a(5) = -1 because 5 is prime and therefore bigomega(5) = 1 and (-1)^1 = -1.
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 37.
  • P. Borwein, S. Choi, B. Rooney and A. Weirathmueller, The Riemann Hypothesis: A Resource for the Aficionado and Virtuoso Alike, Springer, Berlin, 2008, pp. 1-11.
  • H. Gupta, On a table of values of L(n), Proceedings of the Indian Academy of Sciences. Section A, 12 (1940), 407-409.
  • H. Gupta, A table of values of Liouville's function L(n), Research Bulletin of East Panjab University, No. 3 (Feb. 1950), 45-55.
  • P. Ribenboim, Algebraic Numbers, p. 44.
  • J. Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 279.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, Exercise 3.3.5 on page 99.
  • J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 112.

Crossrefs

Möbius transform of A010052.
Cf. A182448 (Dgf at s=2), A347328 (Dgf at s=3), A347329 (Dgf at s=4).

Programs

  • Haskell
    a008836 = (1 -) . (* 2) . a066829  -- Reinhard Zumkeller, Nov 19 2011
    
  • Maple
    A008836 := n -> (-1)^numtheory[bigomega](n); # Peter Luschny, Sep 15 2011
    with(numtheory): A008836 := proc(n) local i,it,s; it := ifactors(n): s := (-1)^add(it[2][i][2], i=1..nops(it[2])): RETURN(s) end:
  • Mathematica
    Table[LiouvilleLambda[n], {n, 100}] (* Enrique Pérez Herrero, Dec 28 2009 *)
    Table[If[OddQ[PrimeOmega[n]],-1,1],{n,110}] (* Harvey P. Dale, Sep 10 2014 *)
  • PARI
    {a(n) = if( n<1, 0, n=factor(n); (-1)^sum(i=1, matsize(n)[1], n[i,2]))}; /* Michael Somos, Jan 01 2006 */
    
  • PARI
    a(n)=(-1)^bigomega(n) \\ Charles R Greathouse IV, Jan 09 2013
    
  • Python
    from sympy import factorint
    def A008836(n): return -1 if sum(factorint(n).values()) % 2 else 1 # Chai Wah Wu, May 24 2022

Formula

Dirichlet g.f.: zeta(2s)/zeta(s); Dirichlet inverse of A008966.
Sum_{ d divides n } lambda(d) = 1 if n is a square, otherwise 0.
Completely multiplicative with a(p) = -1, p prime.
a(n) = (-1)^A001222(n) = (-1)^bigomega(n). - Jonathan Vos Post, Apr 16 2006
a(n) = A033999(A001222(n)). - Jaroslav Krizek, Sep 28 2009
Sum_{d|n} a(d) *(A000005(d))^2 = a(n) *Sum{d|n} A000005(d). - Vladimir Shevelev, May 22 2010
a(n) = 1 - 2*A066829(n). - Reinhard Zumkeller, Nov 19 2011
a(n) = i^(tau(n^2)-1) where tau(n) is A000005 and i is the imaginary unit. - Anthony Browne, May 11 2016
a(n) = A106400(A156552(n)). - Antti Karttunen, May 30 2017
Recurrence: a(1)=1, n > 1: a(n) = sign(1/2 - Sum_{dMats Granvik, Oct 11 2017
a(n) = Sum_{ d | n } A008683(d)*A010052(n/d). - Jinyuan Wang, Apr 20 2019
a(1) = 1; a(n) = -Sum_{d|n, d < n} mu(n/d)^2 * a(d). - Ilya Gutkovskiy, Mar 10 2021
a(n) = (-1)^A349905(n). - Antti Karttunen, Apr 26 2022
From Ridouane Oudra, Jun 02 2024: (Start)
a(n) = (-1)^A066829(n);
a(n) = (-1)^A063647(n);
a(n) = A101455(A048691(n));
a(n) = sin(tau(n^2)*Pi/2). (End)

A051470 a(n) is least value of m for which the sum of Liouville's function from 1 to m is n.

Original entry on oeis.org

1, 906150258, 906150259, 906150260, 906150263, 906150264, 906150331, 906150334, 906150337, 906150338, 906150339, 906150358, 906150359, 906150362, 906150363, 906150368, 906150387, 906150388, 906150389, 906150406, 906150407
Offset: 1

Views

Author

Keywords

Comments

It was once conjectured that the sum of Liouville's function was never > 0 except for the first term.
It follows from Theorem 2 in Borwein-Ferguson-Mossinghoff that a(n) < 262*n^2 infinitely often, improving on an earlier result of Anderson & Stark. - Charles R Greathouse IV, Jun 14 2011
a(830) > 2 * 10^14 (probably around 3.511e14) and a(1160327) = 351753358289465 according to the calculations of Borwein, Ferguson, & Mossinghoff. - Charles R Greathouse IV, Jun 14 2011
3.75 * 10^14 < a(1160328) <= 23156359315279877168. - Hiroaki Yamanouchi, Oct 04 2015
From Jianing Song, Aug 06 2021: (Start)
a(n) is the smallest m such that A002819(m) = n.
This sequence is strictly increasing since A002819(m) - A002819(m-1) = A008836(m) = +-1. (End)

Examples

			The sum of Liouville's function from 1 through 906150258 is 2, that is the smallest value, so a(2)=906150258.
		

References

  • R. J. Anderson and H. M. Stark, Oscillation theorems, Analytic Number Theory (1980); Lecture Notes in Mathematics 899 (1981), pp. 79-106.

Crossrefs

Cf. A008836 (Liouville's function), A002819, A028488.

Programs

  • PARI
    print1(r=1);t=0;for(n=906150257,906400000,t+=(-1)^bigomega(n);if(t>r,r=t;print1(", "n))) \\ Charles R Greathouse IV, Jun 14 2011

A174863 Little omega analog to Liouville's function L(n).

Original entry on oeis.org

1, 0, -1, -2, -3, -2, -3, -4, -5, -4, -5, -4, -5, -4, -3, -4, -5, -4, -5, -4, -3, -2, -3, -2, -3, -2, -3, -2, -3, -4, -5, -6, -5, -4, -3, -2, -3, -2, -1, 0, -1, -2, -3, -2, -1, 0, -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
Offset: 1

Views

Author

Alonso del Arte, Dec 01 2010

Keywords

Comments

Instead of using the Omega function, number of prime factors counted with multiplicity, this is using the omega function, number of distinct prime factors.
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.
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]
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

Examples

			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.)
		

Crossrefs

Partial sums of A076479. - Reinhard Zumkeller, Jun 01 2013
Cf. A002819 (Liouville's function), A002321 (Mertens's function), A275547 (where a(n) is zero).
Cf. A346617.

Programs

  • Haskell
    a174863 n = a174863_list !! (n-1)
    a174863_list = scanl1 (+) a076479_list
    -- Reinhard Zumkeller, Jun 01 2013
    
  • Mathematica
    s=0; Table[s=s+(-1)^PrimeNu[n]; s, {n, 100}] (* PrimeNu is new in Mathematica 7.0 *)
  • PARI
    a(n)=sum(k=1,n,(-1)^omega(k)) \\ Charles R Greathouse IV, Mar 27 2012
    
  • 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
    
  • Python
    from sympy import primefactors
    def omega(n): return 0 if n==1 else len(primefactors(n))
    def a(n): return sum([(-1)**omega(i) for i in range(1, n + 1)]) # Indranil Ghosh, May 20 2017

Formula

a(n) = Sum_{i = 1..n} (-1)^omega(i).
A275547(a(n)) = 0. - Alois P. Heinz, Aug 03 2016
From Ridouane Oudra, Dec 31 2020: (Start)
a(n) = Sum_{i=1..n} Sum_{j=1..n} mu(i*j)*floor(n/(i*j));
a(n) = Sum_{i=1..n} mu(i)*tau(i)*floor(n/i);
a(n) = Sum_{i=1..n} 2^Omega(i)*mu(i)*floor(n/i), where Omega = A001222. (End)
From Amiram Eldar, Mar 05 2021: (Start)
a(n) ~ O(n * exp(-c*sqrt(log(n)))) (Schwarz, 1972).
a(n) ~ o(n) (van de Lune and Dressler, 1975). (End)
a(n) = 1 + Sum_{k>=1} (-1)^k * A346617(n,k). - Alois P. Heinz, Aug 19 2021

A055038 Number of numbers <= n with an odd number of prime factors (counted with multiplicity).

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 5, 5, 5, 6, 7, 8, 8, 8, 8, 9, 10, 11, 12, 12, 12, 13, 13, 13, 13, 14, 15, 16, 17, 18, 19, 19, 19, 19, 19, 20, 20, 20, 20, 21, 22, 23, 24, 25, 25, 26, 27, 27, 28, 28, 29, 30, 30, 30, 30, 30, 30, 31, 31, 32, 32, 33, 33, 33, 34, 35, 36, 36, 37, 38, 39, 40, 40, 41
Offset: 1

Views

Author

Antreas P. Hatzipolakis (xpolakis(AT)otenet.gr), Jun 01 2000

Keywords

Comments

Partial sums of A066829.

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 92.

Crossrefs

Programs

  • Haskell
    a055038 n = a055038_list !! (n-1)
    a055038_list = scanl1 (+) a066829_list
    -- Reinhard Zumkeller, Nov 19 2011
    
  • Mathematica
    Boole[OddQ[PrimeOmega[#]]]& /@ Range[100] // Accumulate (* Jean-François Alcover, Nov 21 2019 *)
  • PARI
    first(n)=my(s); vector(n,k,s+=bigomega(k)%2) \\ Charles R Greathouse IV, Sep 02 2015
    
  • Python
    from operator import ixor
    from functools import reduce
    from sympy import factorint
    def A055038(n): return sum(1 for i in range(1,n+1) if reduce(ixor, factorint(i).values(),0)&1) # Chai Wah Wu, Jan 01 2023

Formula

a(n) = (1/2)*Sum_{k=1..n} (1-lambda(k)) = (1/2)*(n-L(n)), where lambda(n) = A008836(n) and L(n) = A002819(n).

Extensions

Formula and more terms from Vladeta Jovovic, Dec 03 2001
Offset corrected by Reinhard Zumkeller, Nov 19 2011
Showing 1-10 of 30 results. Next