OFFSET
1,9
FORMULA
a(n) = Sum_{q=1..floor(n/9)} Sum_{p=q..floor((n-q)/8)} Sum_{o=p..floor((n-p-q)/7)} Sum_{m=o..floor((n-o-p-q)/6)} Sum_{l=m..floor((n-m-o-p-q)/5)} Sum_{k=l..floor((n-l-m-o-p-q)/4)} Sum_{j=k..floor((n-k-l-m-o-p-q)/3)} Sum_{i=j..floor((n-j-k-l-m-o-p-q)/2)} (c(i) + c(j) + c(k) + c(l) + c(m) + c(o) + c(p) + c(q) + c(n-i-j-k-l-m-o-p-q)), where c(x) = [gcd(n,x) = 1] and [ ] is the Iverson bracket.
EXAMPLE
The partitions of 12 into 9 parts are: 1+1+1+1+1+1+1+1+4, 1+1+1+1+1+1+1+2+3, and 1+1+1+1+1+1+2+2+2. 12 is coprime to 1, but not 2, 3, or 4. Since there are 21 total parts in these partitions that are coprime to 12, a(12) = 21.
MATHEMATICA
Table[Count[Flatten[IntegerPartitions[n, {9}]], _?(CoprimeQ[#, n]&)], {n, 50}] (* Harvey P. Dale, Sep 10 2024 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, May 27 2023
STATUS
approved