Base conversion problems Let $b$ be an integer greater than 2, and let $N_b = 1_b + 2_b + \cdots + 100_b$ (the sum contains all valid base $b$ numbers up to $100_b$). Compute the number of values of $b$ for which the sum of the squares of the base $b$ digits of $N_b$ is at most 512.
Since we are adding up to $100$ in base $b$, I set up the equation
$$N=\frac{b^2(b^2+1)}{2},$$
and then tried to find the values that satisfy this.
For even values, of $b$, i got 16 values, but I don't know about odd values.
Now I am stuck.

We have
$$
2N = b^2(b^2+1)=b^4+b^2 = 10100_b
$$
You need to show that
$$
10100_b = 
\left\lbrace\begin{array}{c}
2 \cdot \left[ \tfrac{b}{2},0,\tfrac{b}{2},0 \right]_b
&\text{for even $b$}\\
2 \cdot \left[ \tfrac{b-1}{2},\tfrac{b+1}{2},0,0 \right]_b
&\text{for odd $b$}\\
\end{array}\right.
$$
where $[d_3,d_2,d_1,d_0]_b = d_3b^3 + d_2b^2 + d_1b^1 + d_0b^0$.
You can prove the above by addition:
$$
2 \cdot \left[ \tfrac{b}{2},0,\tfrac{b}{2},0 \right]_b
= \left[ \tfrac{b}{2},0,\tfrac{b}{2},0 \right]_b 
+ \left[ \tfrac{b}{2},0,\tfrac{b}{2},0 \right]_b \\
2 \cdot \left[ \tfrac{b-1}{2},\tfrac{b+1}{2},0,0 \right]_b
= \left[ \tfrac{b-1}{2},\tfrac{b+1}{2},0,0 \right]_b
+ \left[ \tfrac{b-1}{2},\tfrac{b+1}{2},0,0 \right]_b
$$
The remaining part is easy - just count all even $b$s such that $\frac{b^2}{2} \leq 512$ and all odd $b$s such that $\frac{b^2 + 1}{2} \leq 512$.
