login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A189021 Apostol's second order Möbius (or Moebius) function mu_2(n). 5
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 (list; graph; refs; listen; history; text; internal format)
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

Antti Karttunen, Table of n, a(n) for n = 1..10000

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.

Index entries for sequences computed from exponents in factorization of n

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

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

from operator import mul

def a(n): return 1 if n==1 else reduce(mul, [1 if e==1 else -1 if e==2 else 0 for p, e in factorint(n).items()])

print map(a, range(1, 201)) # Indranil Ghosh, Jul 19 2017

CROSSREFS

Cf. A008683, A053864, A189022, A189023.

Sequence in context: A115789 A212793 A053864 * A307420 A129667 A071374

Adjacent sequences:  A189018 A189019 A189020 * A189022 A189023 A189024

KEYWORD

sign,mult,changed

AUTHOR

R. J. Mathar, Apr 15 2011

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 15 22:02 EST 2019. Contains 330012 sequences. (Running on oeis4.)