TITLE: Find closed form for $1, 2, 2, 3, 4, 4, 5, 6, 6, 7, 8, 8, 9, 10, 10, \ldots$
QUESTION [28 upvotes]: Is there any closed form for the following?
$$1, 2, 2, 3, 4, 4, 5, 6, 6, 7, 8, 8, 9, 10, 10, \ldots$$
I tried to find one, but I failed.
I saw solution on Wolfram Alpha, but I didn't understand it:
Generating function: $$\mathcal G_n(a_n)(z)=\dfrac{z+1}{(z-1)^2(z^2+z+1)}$$
What does that function mean, and how does it give me the solution to my question?

REPLY [31 votes]: Without floors, ceilings, or rounding:
$\dfrac{2\sin(\frac23(n-1)\pi)}{3\sqrt3}+\dfrac{2n+1}3$