There appears to be twice the number of loops on the graph as the value of k.

I am not sure how b changes the graph, but I am going to guess that it changes the size.

Let's check some more examples to see if we are right ....

In the above example, b=12 and k=2

Let's try one more ...

In the above case, b=3 and k=4

I think we are on to something!  The number of look ARE two times the value of k and the size of the graph is smaller when we decrease the value of b and the graph is larger when we increase the value of b!