Let $k$ be a positive integer. Bernardo and Silvia take turns writing and erasing numbers on a blackboard as follows: Bernardo starts by writing the smallest perfect square with $k+1$ digits. Every time Bernardo writes a number, Silvia erases the last $k$ digits of it. Bernardo then writes the next perfect square, Silvia erases the last $k$ digits of it, and this process continues until the last two numbers that remain on the board differ by at least $2$. Let $f(k)$ be the smallest positive integer not written on the board. For example, if $k=1$, then the numbers that Bernardo writes are $16, 25, 36, 49,$ and $64$, and the numbers showing on the board after Silvia erases are $1, 2, 3, 4,$ and $6$, and thus $f(1)=5$. What is the sum of the digits of $f(2)+f(4)+f(6)+\cdots+f(2016)$?
设 $k$ 为正整数。Bernardo 和 Silvia 轮流在黑板上写数并擦除数字,规则如下:Bernardo 先写下最小的、具有 $k+1$ 位的完全平方数。每当 Bernardo 写下一个数,Silvia 就把它的末尾 $k$ 位数字擦掉。随后 Bernardo 写下下一个完全平方数,Silvia 再擦掉其末尾 $k$ 位,如此继续,直到黑板上最后保留下来的两个数之差至少为 $2$。定义 $f(k)$ 为黑板上从未出现过的最小正整数。比如当 $k=1$ 时,Bernardo 写下的数是 $16, 25, 36, 49, 64$;Silvia 擦除后黑板上显示的是 $1, 2, 3, 4, 6$,因此 $f(1)=5$。求 $f(2)+f(4)+f(6)+\cdots+f(2016)$ 的各位数字之和。