The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A123066 (Number of numbers <= n with an odd number of distinct prime factors) - (number of numbers <= n with an even number of distinct prime factors). 5
 0, 1, 2, 3, 4, 3, 4, 5, 6, 5, 6, 5, 6, 5, 4, 5, 6, 5, 6, 5, 4, 3, 4, 3, 4, 3, 4, 3, 4, 5, 6, 7, 6, 5, 4, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 1, 2, 1, 0, -1, 0, -1, -2, -3, -4, -5, -4, -3, -2, -3, -4, -3, -4, -3, -2, -3, -4, -3, -2, -3, -2, -3, -4, -5, -6, -5, -4, -5, -4, -5, -4, -3, -4, -5, -6, -7, -6, -5, -6, -7, -8, -9, -10 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS Analog of A072203 for number of distinct factors. Conjecture that sequence changes sign infinitely often, although the next sign change is probably large. The signs first change at n = 52 and then change again at n = 7954. - Harvey P. Dale, Jul 04 2012 LINKS G. C. Greubel, Table of n, a(n) for n = 1..5000 H. Helfgott and A. Ubis, Primos, paridad y anĂ¡lisis, arXiv:1812.08707 [math.NT], Dec. 2018. FORMULA a(n) = Sum_{k>=1} (-1)^(k-1) * A346617(n,k). - Alois P. Heinz, Aug 19 2021 MAPLE a:= proc(n) option remember; `if`(n<2, 0, a(n-1)+       `if`(nops(ifactors(n)[2])::odd, 1, -1))     end: seq(a(n), n=1..120);  # Alois P. Heinz, Dec 21 2018 MATHEMATICA dpf[n_] := Module[{df = PrimeNu[n]}, If[OddQ[df], 1, -1]]; Join[{0}, Accumulate[ Array[dpf, 100, 2]]] (* Harvey P. Dale, Jul 04 2012 *) CROSSREFS Cf. A030230, A030231. Cf. A072203, A001221. Cf. A346617. Sequence in context: A262519 A225320 A308937 * A330239 A235121 A270652 Adjacent sequences:  A123063 A123064 A123065 * A123067 A123068 A123069 KEYWORD easy,look,sign AUTHOR Franklin T. Adams-Watters, Sep 26 2006 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 27 19:34 EDT 2021. Contains 347694 sequences. (Running on oeis4.)