%I M0198 #122 Jul 06 2024 01:34:23
%S 1,-2,-2,1,-2,4,-2,0,1,4,-2,-2,-2,4,4,0,-2,-2,-2,-2,4,4,-2,0,1,4,0,-2,
%T -2,-8,-2,0,4,4,4,1,-2,4,4,0,-2,-8,-2,-2,-2,4,-2,0,1,-2,4,-2,-2,0,4,0,
%U 4,4,-2,4,-2,4,-2,0,4,-8,-2,-2,4,-8,-2,0,-2,4,-2,-2,4,-8,-2,0,0
%N Moebius transform applied twice to sequence 1,0,0,0,....
%C |a(n)| is the number of ways to write n as a product of 2 squarefree numbers (i.e., number of ways to write n = x*y with 1 <= x <= n, 1 <= y <= n, x and y squarefree). - _Benoit Cloitre_, Jan 01 2003
%D Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 30.
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Seiichi Manyama, <a href="/A007427/b007427.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from T. D. Noe)
%H Yu Hin (Gary) Au, <a href="https://arxiv.org/abs/2205.03680">Decompositions of Unit Hypercubes and the Reversion of a Generalized Möbius Series</a>, arXiv:2205.03680 [math.CO], 2022.
%H Enrique Pérez Herrero, <a href="https://sites.google.com/site/psychgeom/psychgeom/Piltz.m?attredirects=0&d=1">Mathematica Package for Piltz Divisor Functions</a>.
%H Enrique Pérez Herrero, <a href="/A007427/a007427.m.txt">Mathematica Package for Piltz Divisor Functions</a>.
%H Adolf Piltz, <a href="https://gdz.sub.uni-goettingen.de/id/PPN271032898">Ueber das Gesetz, nach welchem die mittlere Darstellbarkeit der natürlichen Zahlen als Produkte einer gegebenen Anzahl Faktoren mit der Grösse der Zahlen wächst</a>, Doctoral Dissertation, Friedrich-Wilhelms-Universität zu Berlin, 1881; the k-th Piltz function tau_k(n) is denoted by phi(n,k) and its recurrence and Dirichlet series appear on p. 6.
%H N. J. A. Sloane, <a href="/transforms.txt">Transforms</a>.
%H Wikipedia, <a href="https://de.wikipedia.org/wiki/Adolf_Piltz">Adolf Piltz</a>.
%F Dirichlet g.f.: 1/zeta(s)^2.
%F Multiplicative function with a(p^e) = binomial(2, e)*(-1)^e for p prime and e >= 0.
%F a(n) = Sum_{d|n} mu(d)*mu(n/d). - _Benoit Cloitre_, Apr 05 2002
%F a(n^2) = A008683(n)^2. a(A005117(n)) = (-2)^A001221(A005117(n)). - _Enrique Pérez Herrero_, Jun 27 2011 [Misrendering of contribution rectified by _Peter Munn_, Mar 06 2020]
%F a(n) is the Dirichlet inverse of A000005, which means a(n) = -Sum_{d|n, d<n} A000005(n/d)*a(d). - _Enrique Pérez Herrero_, Jan 19 2013
%F a(n) = 0 if n is not cubefree: A046099, otherwise sign(a(n)) = lambda(n), where lambda is A008836. - _Enrique Pérez Herrero_, Jan 19 2013
%F Dirichlet g.f. of |a(n)|: zeta(s)^2/zeta(2s)^2 (conjectured). - _Ralf Stephan_, Jul 05 2013. The conjecture is correct because 1+Sum_{e>=1} binomial(2,e)/p^(e*s) = (p^s+1)^2/p^2s, whose product over p is zeta(s)^2/zeta(2s)^2. - _Michael Shamos_
%F a(n) = Sum_{k=1..A000005(n)} A225817(n,k)*A225817(n,n+1-k). - _Reinhard Zumkeller_, Jul 30 2013
%F G.f. A(x) satisfies: A(x) = x - Sum_{k>=2} tau(k)*A(x^k), where tau = A000005. - _Ilya Gutkovskiy_, May 11 2019
%F Sum_{k=1..n} abs(a(k)) ~ (n/zeta(2)^2) * (log(n) + 2*gamma - 1 - 4*zeta'(2)/zeta(2)), where gamma is Euler's constant (A001620). - _Amiram Eldar_, Dec 24 2023
%e G.f. = x - 2*x^2 - 2*x^3 + x^4 - 2*x^5 + 4*x^6 - 2*x^7 + x^9 + 4*x^10 + ...
%e We have a(3^1) = C(2, 1)*(-1)^1 = -2, a(3^2) = C(2, 2)*(-1)^2 = 1, and a(3^m) = C(2, m)*(-1)^m = 0 for m >= 3. - _Petros Hadjicostas_, Jun 07 2019
%p möbius := proc(a) local b, i, mo: b := NULL:
%p mo := (m,n) -> `if`(irem(m,n) = 0, numtheory:-mobius(m/n), 0);
%p for i to nops(a) do b := b, add(mo(i,j)*a[j], j=1..i) od: [b] end:
%p (möbius@@2)([1, seq(0, i=1..80)]); # _Peter Luschny_, Sep 08 2017
%t f[n_] := Plus @@ Times @@@ (MoebiusMu[{#, n/#}] & /@ Divisors@n); Array[f, 105] (* _Robert G. Wilson v_ *)
%t a[n_] := DivisorSum[n, MoebiusMu[#]*MoebiusMu[n/#]&]; Array[a, 80] (* _Jean-François Alcover_, Dec 01 2015 *)
%o (PARI) {a(n) = if( n<1, 0, direuler(p=2, n, (1 - X)^2)[n])}; /* _Michael Somos_, Nov 15 2002 */
%o (PARI) {a(n) = if(n<1, 0, sumdiv(n, d, moebius(d) * moebius(n/d)))}; /* _Michael Somos_, Nov 15 2002 */
%o (PARI) a(n)=if(n>1,my(f=factor(n)[,2],s=sum(i=1,#f,f[i]==1));if(vecmax(f)>2,0,(-1)^s<<s),1) \\ _Charles R Greathouse IV_, Jun 28 2011
%o (Haskell)
%o a007427 n = sum $ zipWith (*) mds $ reverse mds where
%o mds = a225817_row n
%o -- _Reinhard Zumkeller_, Jul 30 2013
%o (Python)
%o from math import prod, comb
%o from sympy import factorint
%o def A007427(n): return prod(-comb(2,e) if e&1 else comb(2,e) for e in factorint(n).values()) # _Chai Wah Wu_, Jul 05 2024
%Y Dirichlet inverse of A000005, Mobius transform of A008683.
%Y Cf. A063524, A007428, A005117, A008836, A046099, A225817.
%Y Cf. A013661, A001620, A306016.
%K sign,easy,nice,mult
%O 1,2
%A _N. J. A. Sloane_
%E Added a proof of Stephan's conjecture about the Dirichlet g.f. of |a(n)|.