How many ways are there to write $1000$ as a sum of powers of $2,$ ($2^0$ counts), where each power of two can be used a maximum of $3$ times. Furthermore, $1+2+4+4$ is the same as $4+2+4+1$. These count as one arrangement, not two separate ones.
To clarify, the ways to write $4$ as a sum of powers are:
$4=4, 2+2=4, 1+2+1.$
I think these go up in increments of $2,$ for example the ways to write $8$ is 5...etc. so it would just be the 1000th term of that sequence, but I may be missing something. How would I start this problem?
You can write a recurrence. If $n$ is odd, you need an odd number of $1$ terms, so write down a $1$ and consider $n-1$ in what follows. If $n$ is even, you can either use $0$ or $2\ 1$s. If you use $2\ 1$s, you have $n-2$ left to express and can't use any $1$s, so you can express $\frac 12(n-2)$ and multiply all the terms by $2$. If you don't use any $1$s, you can express $\frac n2$ and multiply all the terms by $2$. So if $a(n)$ is the number of ways to express $n$ we have $$a(n)=\begin{cases}1&n=1\\2&n=2\\a(\frac n2)+a(\frac{n}2-1)&n \text{ even}\\a(n-1)&n\text{ odd}\end{cases}$$ Rob Pratt finds that the solution is $a(n)=1+\lfloor \frac n2 \rfloor$. This works for $1,2$. Then if it works up through even $n$, $a(n+1)=a(n)=1+\lfloor \frac {n+1}2 \rfloor, a(n+2)=a(\frac n2+1)+a(\frac n2)=1+\lfloor \frac{\frac n2+1}2\rfloor+1+\lfloor \frac{\frac n2}2\rfloor=1+\lfloor \frac {n+2}2\rfloor$