[Mailbag] What Do You Do with the Ideas You Used to Call “Mistakes”

Guillaume ParĂ©, in the very interesting comments of my last post where I
urged us to reconsider mistakes: I do agree with what is written, but I am
still w...
1 week ago
The answer is 24800.
ReplyDeleteInteger solutions correspond to lattice points inside the right triangle with vertices (0,0), (250,0), and (0,200), together with the points on the hypotenuse, but excluding (250,0) and (0,200).
We start with the rectangle with corners (0,0), (250,0), (0,200), and (250,200). The rectangle contains 251*201 = 50451 lattice points.
The diagonal from (250,0) to (0,200) contains 51 lattice points. Of the remaining 50400 lattice points, half of them (or 25200) lie below the diagonal.
To get the final answer, we add back the lattice points on the diagonal, and then subtract the lattice points on the axes.
So the answer is 25200 + 51  200  250  1 = 24800.
;; Brute forced in scheme:
ReplyDelete(define (potd x c) (if (> 1001 (* 5 x)) (potd (+ 1 x) (+ c (floor (/ ( 1000 (* 5 x)) 4)))) c))
(potd 1 0)