Count of relatively prime partitions
JavaScript (ES6), 130 120 bytes

f=(n,d=n)=&gt;d&amp;&amp;(n%d?0:(M=n=&gt;n%++k?k&gt;n||M(n):n/k%k&amp;&amp;-M(n/k))(n/d,k=1)*(P=n=&gt;!k|n&lt;0?0:n?P(n,k--)+P(n-++k):1)(k=d))+f(n,d-1)


Demo



f=(n,d=n)=&gt;d&amp;&amp;(n%d?0:(M=n=&gt;n%++k?k&gt;n||M(n):n/k%k&amp;&amp;-M(n/k))(n/d,k=1)*(P=n=&gt;!k|n&lt;0?0:n?P(n,k--)+P(n-++k):1)(k=d))+f(n,d-1)

for(n = 1; n &lt;= 30; n++) {
  console.log('a(' + n + ') = ' + f(n))
}




How?

This is recursively computing:

     /                  \     /                   \
    |  (M = n =&gt;         |   |  (P = n =&gt;          |
    |    n % ++k ?       |   |    !k | n &lt; 0 ?     |
    |      k &gt; n ||      |   |      0              |
    |      M(n)          |   |    :                |
sum |    :               | * |      n ?            | for d in divisors(n)
    |      n / k % k &amp;&amp;  |   |        P(n, k--) +  |
    |      - M(n / k)    |   |        P(n - ++k)   |
    |  )(n / d, k = 1)   |   |      :              |
    |                    |   |        1            |
    |                    |   |  )(k = d)           |
     \                  /     \                   /
        Möbius(n / d)            npartitions(d)