<s>[INST] Counting orbits under $\operatorname{Sym}(3)$ I'd like a closed form expression $x(n)$ for the number of orbits of the symmetric group on $3$ points acting on the triples in $\{ (a,b,c) \mid a,b,c \in \Bbb{Z}, 1 \leq a,b,c \leq n, c = 2n−a−b \}$.
I feel like this should be a really basic problem, but my standard method of attack fails: look it up in OEIS and prove the known formula.  My backup plan of "think about it" has failed: I don't know how to deal with the restriction on $c$. (Without the restriction, I happen to have learned this is the same thing as counting $1 \leq a \leq b \leq c \leq n$, and I happen to have learned this is Binomial($n+2$, $3$) because you need to place two bars between $n$ stars, but I have no general context for this.)
I suspect this is a pretty standard counting problem even with the restriction, but I never really learned how to count (fish, fish, fish, …, fish, fish, …, fish).
The counts $x(n)$ for $n=1$ to $30$ are: $0, 1, 2, 3, 4, 6, 7, 9, 11, 13, 15, 18, 20, 23, 26$, $29, 32, 36, 39, 43, 47, 51, 55, 60, 64, 69, 74, 79, 84, 90$.
I think there are $(n-1)\cdot(n+4)/2$ triples, but even that is a little fuzzy (increase increases by $1$ each time).  I have no idea how many of them have $2$ equal components.
 [/INST] This one can also be done using the Polya Enumeration Theorem. Recall the cycle index of the symmetric group on three elements which can be computed using pen and paper by factorizing the six constituent permutations and has the value
$$Z(S_3) = \frac{1}{6}\left(a_1^3 + 3 a_1 a_2 + 2 a_3 \right).$$
Then the desired value is given by
$$[z^{2n}] Z(S_3)(z+z^2+\cdots+z^n).$$
Actually doing the substitution we get
$$[z^{2n}]\frac{1}{6}(z+z^2+\cdots+z^n)^3 \\+ 
[z^{2n}]\frac{1}{2} (z+z^2+\cdots+z^n) (z^2+z^4+\cdots+z^{2n}) \\+ 
[z^{2n}]\frac{1}{3} (z^3+z^6+\cdots+z^{3n}).$$
Now the contribution from the first term is
$$[z^{2n}]\frac{z^3}{6}(1+z+\cdots+z^{n-1})^3
= [z^{2n-3}]\frac{1}{6} \frac{(1-z^n)^3}{(1-z)^3}.$$
This is in fact (use the Newton binomial)
$$[z^{2n-3}]\frac{1}{6} \frac{1-3z^n}{(1-z)^3}
=\frac{1}{6}{2n-3+2\choose 2} 
-\frac{1}{2}{n-3+2\choose 2}
\\= \frac{1}{6}{2n-1\choose 2} 
-\frac{1}{2}{n-1\choose 2} 
\\ = \frac{1}{12} n^2 +\frac{1}{4} n - \frac{1}{3}.$$
For the second term we see by inspection that for those terms from $z+z^2+\cdots+z^n$ that are even there exists a matching term from $z^2+z^4+\cdots+z^{2n}$ that gives an exponent sum of $2n$ making for a contribution of
$$\frac{1}{2}\bigg\lfloor\frac{n}{2}\bigg\rfloor
= \frac{1}{4} n - \frac{1}{4} (n\bmod 2).$$
Finally the third term contributes the value $1/3$ if $n$ is divisible by three.
This gives the final result
$$\frac{1}{12} n^2 +\frac{1}{2} n
+ \begin{cases} 0 & \quad\text{if}\quad n \bmod 6 = 0,\\
-\frac{7}{12} & \quad\text{if}\quad n \bmod 6 = 1,5 \\
-\frac{1}{3} & \quad\text{if}\quad n \bmod 6 = 2,4 \\
-\frac{1}{4} & \quad\text{if}\quad n \bmod 6 = 3.
\end{cases}.$$ 
The computation at this MSE link is somewhat similar, as is the one at this MSE link II which also uses the Newton binomial.
</s>