login
A189021
Apostol's second order Möbius (or Moebius) function mu_2(n).
8
1, 1, 1, -1, 1, 1, 1, 0, -1, 1, 1, -1, 1, 1, 1, 0, 1, -1, 1, -1, 1, 1, 1, 0, -1, 1, 0, -1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, -1, 1, 1, 0, -1, -1, 1, -1, 1, 0, 1, 0, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, -1, -1, 1, 1, 1, 0, 0, 1, 1, -1, 1, 1, 1, 0, 1, -1, 1, -1, 1, 1, 1, 0, 1, -1, -1, 1
OFFSET
1
COMMENTS
The function mu_k(n) is defined to be 0 if a (k+1)st power of a prime divides n, otherwise it is (-1)^r where r is the number of distinct primes p that appear as p^k in the canonical factorization of n.
Differs from the (non-multiplicative) A053864 at n= 12, 18, 20, 28, 44, 45, 50, 52, 60, ... R. J. Mathar, Dec 17 2012
LINKS
Tom Apostol, Introduction to analytic number theory, (1976) Springer, page 50
Tom Apostol, Mobius function of order k, Pac. J. Math. 32 (1) (1970) 21-27
Antal Bege, A generalization of Apostol's Mobius functions of order k, arXiv:0907.5293 [math.NT], 2009.
R. J. Mathar, Survey of Dirichlet series of multiplicative arithmetic functions, arXiv:1106.4038 [math.NT], 2011-2012, Section 4.3.
A. F. Möbius, Über eine besondere Art von Umkehrung der Reihen. Journal für die reine und angewandte Mathematik 9 (1832), 105-123.
FORMULA
mu_1(n) = mu(n) = A008683(n).
mu_k(n) = sum_{d^k|n} mu_{k-1}(n/d^k)*mu_{k-1}(n/d), k>=2.
Multiplicative with a(p)=1, a(p^2)=-1 and a(p^e)=0 if e>=3. Dirichlet g.f. product_{primes p} (1+p^(-s)-p^(-2s)). - R. J. Mathar, Oct 31 2011
Sum_{n <= x} a(n) = kx + O(sqrt(x) log x), where k = 0.4282495... = A065464. - Charles R Greathouse IV, Jan 24 2018
MAPLE
A189021 := proc(n) local d, d1, d2; d1:=divisors(n); d2:=select(m->member(m^2, d1), d1); add(mobius(n/d^2)*mobius(n/d), d=d2) end; # Peter Luschny, Oct 30 2010
mu := proc(n, k) local d, a; if k = 1 then return numtheory[mobius](n) ; end if; a := 0 ; for d in numtheory[divisors](n) do if n mod (d^k) = 0 then a := a+procname(n/d^k, k-1)*procname(n/d, k-1) ; end if; end do: a ; end proc:
A189021 := proc(n) mu(n, 2) ; end proc:
MATHEMATICA
a[1] = 1; a[n_] := Sum[ Boole[ Divisible[n, d^2]]*MoebiusMu[n/d^2]*MoebiusMu[n/d], {d, Divisors[n]}]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jun 24 2013 *)
f[p_, e_] := Which[e == 1, 1, e==2, -1, e > 2, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 21 2020 *)
PROG
(PARI) a(n)=if(n<2, 1, sumdiv(n, d, if(n%d^2, 0, moebius(n/d^2)*moebius(n/d)))) \\ Benoit Cloitre, Oct 03 2010
(Scheme) (define (A189021 n) (cond ((= 1 n) n) (else (* (case (A067029 n) ((1) 1) ((2) -1) (else 0)) (A189021 (A028234 n)))))) ;; (after the given multiplicative formula) - Antti Karttunen, Jul 18 2017
(Python)
from sympy import factorint, prod
def a(n): return 1 if n==1 else prod(1 if e==1 else -1 if e==2 else 0 for p, e in factorint(n).items())
print([a(n) for n in range(1, 51)]) # Indranil Ghosh, Jul 19 2017
CROSSREFS
KEYWORD
sign,mult,easy
AUTHOR
R. J. Mathar, Apr 15 2011
STATUS
approved