Does there exist a real differentiable function f with the following properties? (a) ‎‎$‎‎\mathbb{N}\subseteq D_f‎$‎‎
‎
‎(b) If we put ‎$‎f_n := f(n)‎$ ‎and  ‎‎$‎f^\prime_n ‎:= ‎f^\prime‎(n)‎$‎, ‎then the sequence  ‎‎$‎f^\prime(n) -‎ ‎f(n) +‎ ‎\sum_{k=1}^n ‎f^\prime(k)‎$ ‎is ‎convergent ‎but ‎‎$‎‎f^\prime‎(n)‎$ ‎and‎
‎
‎$‎-‎ ‎f(n) +‎ ‎\sum_{k=1}^n ‎f^\prime(k) ‎‎$ ‎are ‎divergent ‎as ‎‎$‎n‎‎\rightarrow ‎‎\infty‎‎$‎.‎
 A: You can get a function with any values for $f(n)$ and $f'(n)$ you'd like, and particularily with values fulfilling the criteria you describe.
There are differentiable functions $g(x)$ such that $g(0) = 1$ and $g'(0) = 0$, and for any $x$ with $|x|>0.5$, we have $g(x) = 0$. For instance, the function
$$
g(x) = \cases{e^{-1/(x-0.5)^2 - 1/(x+0.5)^2 + 8}& if $-0.5<x<0.5$\\0 & otherwise}
$$
has this property. Similarily, $g'(x)$ has the property that $g'(x) = 0$, $g''(0) = -192$, and for any $x$ with $|x|>0.5$, we have $g'(x) = 0$. I will use the function $h(x) = -g'(x)/192$, so that we have $h'(0) = 1$.
Now, let's say we want to have
$$
f(n) = a_n\\
f'(n) = b_n
$$
for $n\in \Bbb N$. Then the function
$$
f(x) = \sum_{n = 1}^\infty a_ng(x-n) + b_nh(x-n)
$$
will have exactly the prescribec values for $f(n)$ and $f'(n)$.
For instance, in your case, we might want $f'(n) = n$ and $-f(n) + \sum_{k = 1}^n f'(k) = -n$. This implies
$$
-n = -f(n) + \sum_{k = 1}^n f'(k)\\
= -f(n) + \sum_{k = 1}^n k\\
= -f(n) + \frac{n(n+1)}{2}
$$
so $f(n) = n + \frac{n(n+1)}{2}$. Thus we have our $a_n$ and $b_n$, and we get
$$
f(x) = \sum_{n = 1}^\infty \left(n +\frac{n(n+1)}2\right)g(x-n) + nh(x-n) 
$$
