Hi, i think it would be best described by a “use case”, it need to behave differently when the user is on the 3 last or 3 first pagination pages (active page is bold):
1 2 3 4 … 15
1 2 3 4 … 15
1 2 3 4 … 15
1 … 3 4 5 … 15
1 … 4 5 6 … 15
1 … 9 10 11… 15
1 … 11 12 13 … 15
1 … 12 13 14 15