Pencils of rays

Problem 372

Let be the number of lattice points which satisfy , and is odd.
We can verify that
and .
Find
.
Note: represents the floor function.