Constant time recursive filter for moving linear regression. Works for any window size k. Formula in the first comment.