Formula for edges of grid?

I have a grid-based game. I have set up my grid and properly numbered the grid tiles from 1 to 200, similar to this:

Now I need to run some nodes on all of the outside edges of my grid. (eg. 1-10, 11, 20, 21, 30, 31, 40 etc.)
Is there a formula I can use that would give me those numbers? My grid can be expanded, so manually entering the numbers won’t work.

Thanks in advance!

Are you asking about a simple loop or am I misunderstanding something severely?

272269-capture.png

This then, I think. You can get the rest of the edges, too. And it should be pretty scalable.

Perfect, thank you!