A007875 Number of ways of writing n as p*q, with p <= q, gcd(p, q) = 1.
1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 4, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, 4, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 4, 1, 2, 2, 1, 2, 4, 1, 2, 2, 4, 1, 2, 1, 2, 2, 2, 2, 4, 1, 2, 1, 2, 1, 4, 2, 2, 2, 2, 1, 4
Offset: 1
Links
- T. D. Noe, Table of n, a(n) for n = 1..1000
- Larry Bates and Peter Gibson, A geometry where everything is better than nice, arXiv:1603.06622 [math.DG], (21-March-2016); see page 2.
- Vaclav Kotesovec, Graph - the asymptotic ratio.
Crossrefs
Programs
-
Haskell
a007875 = length . filter (> 0) . a225817_row -- Reinhard Zumkeller, Jul 30 2013, Aug 24 2011
-
Maple
A007875 := proc(n) if n = 1 then 1; else 2^(A001221(n)-1) ; end if; end proc: # R. J. Mathar, May 28 2016
-
Mathematica
a[n_] := With[{r = Reduce[1 <= p <= q <= n && n == p*q && GCD[p, q] == 1, {p, q}, Integers]}, If[Head[r] === And, 1, Length[r]]]; Table[a[n], {n, 1, 90}] (* Jean-François Alcover, Nov 02 2011 *) a[n_] := EulerPhi[2^PrimeNu[n]]; Array[a, 105] (* Robert G. Wilson v, Apr 10 2012 *) a[n_] := Sum[If[Mod[n, k] == 0, Re[Sqrt[MoebiusMu[k]]], 0], {k, 1, n}] (* Mats Granvik, Aug 10 2018 *)
-
PARI
a(n)=ceil((1<
Charles R Greathouse IV, Nov 02 2011
Formula
a(n) = (1/2)*Sum_{ d divides n } abs(mu(d)) = 2^(A001221(n)-1) = A034444(n)/2, n > 1. - Vladeta Jovovic, Jan 25 2002
Sum_{k=1..n} a(k) ~ 3*n*((log(n) + (2*gamma - 1))/ Pi^2 - 12*(zeta'(2)/Pi^4)), where gamma is the Euler-Mascheroni constant A001620. Equivalently, Sum_{k=1..n} a(k) ~ 3*n*(log(n) + 24*log(A) - 1 - 2*log(2*Pi)) / Pi^2, where A is the Glaisher-Kinkelin constant A074962. - Vaclav Kotesovec, Jan 30 2019
a(n) = Sum_{d|n} mu(d) * A018892(n/d). - Daniel Suteu, Jan 08 2021
Dirichlet g.f.: (zeta(s)^2/zeta(2*s) + 1)/2. - Amiram Eldar, Sep 09 2023
Comments