I am going to be AFK for over a week, so if you come up with a solution you can post it here of course, for others to see, but I may not respond.
It's the kind of problem that's trivial to check though. Either plug in some numbers manually, or if you're not satisfied put P(floor(a), floor(2a)) into your calculator with P as a function of a, and it should be 0 for all a.