A089233 Number of coprime pairs of divisors > 1 of n.
0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 1, 0, 0, 2, 0, 2, 1, 1, 0, 3, 0, 1, 0, 2, 0, 6, 0, 0, 1, 1, 1, 4, 0, 1, 1, 3, 0, 6, 0, 2, 2, 1, 0, 4, 0, 2, 1, 2, 0, 3, 1, 3, 1, 1, 0, 11, 0, 1, 2, 0, 1, 6, 0, 2, 1, 6, 0, 6, 0, 1, 2, 2, 1, 6, 0, 4, 0, 1, 0, 11, 1, 1, 1, 3, 0, 11, 1, 2, 1, 1, 1, 5, 0, 2, 2, 4, 0, 6, 0, 3, 6
Offset: 1
Keywords
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- Andrew Weimholt, Proof of an alternative characterization
Programs
-
Haskell
a089233 n = sum $ [a063524 $ gcd u v | let ds = tail $ a027750_row n, u <- ds, v <- dropWhile (<= u) ds] -- Reinhard Zumkeller, Sep 04 2013
-
Magma
[(NumberOfDivisors(n^2)-1)/2 - NumberOfDivisors(n)+1: n in [1..100]]; // Vincenzo Librandi, Dec 23 2018
-
Mathematica
a[n_] := (DivisorSigma[0, n^2] - 1)/2 - DivisorSigma[0, n] + 1; Array[a, 104] (* Robert G. Wilson v, Dec 16 2009 *)
-
PARI
a(n) = (numdiv(n^2)-1)/2 - numdiv(n) + 1; \\ Michel Marcus, Feb 17 2016
Formula
a(n) = #{(x,y): 1 < x < y, x|n, y|n and gcd(x, y) = 1}.
Comments