Count of relatively prime partitions The partitions of an integer N are all the combinations of integers smaller than or equal to N and higher than 0 which sum up to N.
A relatively prime partition is an integer partition, but whose elements are (overall) coprime; or in other words, there is no integer greater than 1 which divides all of the parts.
Task
Given an integer as input, your task is to output the count of relatively prime partitions it has. Rather not surprised that there is an OEIS sequence for this. The aim is to shorten your code as much as possible, with usual code golf rules.
Also, you don't have to worry about memory errors. Your algorithm must only theoretically work for an arbitrarily big values of N, but it is fine if your language has certain limitations. You can assume that N will always be at least 1.
Test cases and Example
Let's take 5 as an example. Its integer partitions are:
1 1 1 1 1
1 1 1 2
1 1 3
1 2 2
1 4
2 3
5

From this, the first 6 only are relatively prime partitions. Note that the last one (formed by the integer in question only) must not be taken into account as a relatively prime partition (except for N=1) because its GCD is N.
N -&gt; Output

1  -&gt; 1
2  -&gt; 1
3  -&gt; 2
4  -&gt; 3
5  -&gt; 6
6  -&gt; 7
7  -&gt; 14
8  -&gt; 17
9  -&gt; 27
10 -&gt; 34
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)