(define (p01)
  (define (arithmetic-sum first last n)
    (* n (/ (+ first last) 2)))
  (let ((max 999))
    (+ (arithmetic-sum 3 (* 3 (quotient max 3)) (quotient max 3))
       (arithmetic-sum 5 (* 5 (quotient max 5)) (quotient max 5))
       (- (arithmetic-sum 15 (* 15 (quotient max 15)) (quotient max 15))))))

plain