Here's my attempt at solving this:
First, I noticed that $b = (b\mod k)+mk$ for some $m$. Then
$$(2b\mod k) + (b\mod k)=(3b\mod k)+pk$$ for some other integer $p$. So then the partial sum up to $n$ equals the basic arithmetic sum $\sum_{i=1}^n b$ minus some multiple of $k$.
So next, I tried to figure out what that multiple of $k$ would be for a given partial sum up to $n$. From that, I discovered that (assuming $b<k$) the partial sum up to $n=1$ is off by $0$ multiples of $k$, and after that, the $n$th partial sum is off by the $(n-1)$th partial sum + $\left\lfloor \frac{n\cdot b}{k} \right\rfloor$.
From there, I can't find a clearly way to get a closed form, and any progress I make seems to only complicate it further. A lot of this I've discovered through programming, and for those it would help I have a repl.it with my code.
In that link, the array diff contains how many multiples of $k$ the $n$th partial sum is off by, the array x contains my attempt to find a closed form of diff, the array y contains the floor term for each $n$, and length is another array where I was trying to find a pattern in the floor terms.