OFFSET
1,6
FORMULA
a(n) = Sum_{m=1..floor(n/6)} Sum_{l=m..floor((n-m)/5)} Sum_{k=l..floor((n-l-m)/4)} Sum_{j=k..floor((n-k-l-m)/3)} Sum_{i=j..floor((n-j-k-l-m)/2)} (c(i) + c(j) + c(k) + c(l) + c(m) + c(n-i-j-k-l-m)), where c(x) = [gcd(n,x) = 1] and [ ] is the Iverson bracket.
EXAMPLE
The partitions of 9 into 6 parts are: 1+1+1+1+1+4, 1+1+1+1+2+3, and 1+1+1+2+2+2. 9 is relatively prime to 1, 2, and 4. Since there are 17 total parts in these partitions that are coprime to 9, a(9) = 17.
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, May 27 2023
STATUS
approved