OFFSET
1,3
FORMULA
a(n) = Sum_{j=1..floor(n/3)} Sum_{i=j..floor((n-j)/2)} ([gcd(n,n-i-j) = 1] + [gcd(n,i) = 1] + [gcd(n,j) = 1]), where [ ] is the Iverson Bracket.
EXAMPLE
The partitions of 5 into 3 parts are: 3+1+1 and 2+2+1. 5 is coprime to 1, 2 and 3. Since there are 6 total parts in the partitions of 5 that are coprime to 5, a(5) = 6.
MATHEMATICA
Table[Sum[Sum[KroneckerDelta[GCD[n, n - i - j], 1] + KroneckerDelta[GCD[n, j], 1] + KroneckerDelta[GCD[n, i], 1], {i, j, Floor[(n - j)/2]}], {j, Floor[n/3]}], {n, 100}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, May 25 2023
STATUS
approved