let m_1e9 = int_of_float 1e9 + 7
let ( +^ ) x y = (x + y) mod m_1e9
let ( *^ ) x y = ((x mod m_1e9) * (y mod m_1e9)) mod m_1e9

let (n, k) = Scanf.sscanf (read_line ()) "%d %d" @@ fun n k -> (n, k)
let s = Array.init (n + 1) @@ fun i -> i

let to_s arr = arr |> Array.map string_of_int |> Array.to_list |> String.concat " " |> print_endline

let () =
  Array.iteri(fun i _ -> if i > 0 then s.(i) <- s.(i) + s.(i - 1)) s;
  let ans = Array.init (n - k + 2) @@ fun i -> i + k in
  ans 
    |> Array.map (fun i -> s.(n) - s.(max (n - i) 0) - s.(i - 1) + 1)
    |> Array.fold_left ( +^) 0
    |> print_int;
  print_newline ()
