A007423 a(n) = mu(n) + 1, where mu is the Moebius function.
2, 0, 0, 1, 0, 2, 0, 1, 1, 2, 0, 1, 0, 2, 2, 1, 0, 1, 0, 1, 2, 2, 0, 1, 1, 2, 1, 1, 0, 0, 0, 1, 2, 2, 2, 1, 0, 2, 2, 1, 0, 0, 0, 1, 1, 2, 0, 1, 1, 1, 2, 1, 0, 1, 2, 1, 2, 2, 0, 1, 0, 2, 1, 1, 2, 0, 0, 1, 2, 0, 0, 1, 0, 2, 1, 1, 2, 0, 0, 1, 1, 2, 0, 1, 2, 2, 2, 1, 0, 1, 2, 1, 2, 2, 2, 1, 0, 1, 1, 1
Offset: 1
References
- G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 234.
- K. Ireland and M. Rosen, A Classical Introduction to Modern Number Theory. Springer-Verlag, NY, 1982, p. 19.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A008683 (mu).
Programs
-
Haskell
a007423 = (+ 1) . a008683 -- Reinhard Zumkeller, Jul 30 2014
-
Maple
with(numtheory); A007423:=n->mobius(n)+1; seq(A007423(k), k=1..100); # Wesley Ivan Hurt, Oct 24 2013
-
Mathematica
MoebiusMu[Range[100]]+1 (* Harvey P. Dale, Nov 08 2011 *)
-
PARI
a(n)=moebius(n)+1 \\ Charles R Greathouse IV, Feb 25 2018
Formula
a(n) = abs(a(n)).