The Floor's Revenge

Problem 546

Define fk(n) = fk() where fk(0) = 1 and denotes the floor function.
For example, f5(10) = 18, f7(100) = 1003, and f2(103) = 264830889564.
Find fk(1014) mod (109+7).