I can provide the code if you want to try the python/numpy route.
But do consider the size of a 5000 m ring size.
What is the cell size you are using? You can see how things get quickly out of hand . Here are two buffer sizes with a 1 and 10 m cell size for a 5km and 20km diameter (2.5, 10. radii)
cell size radius buffer cells
1 2500 m 19,634,954 ish
10 196,349
1 10,000 m 314,159,265
10 3,141,593
Now you say the rings are 5000m apart
1m cell size radius (2500*20), cells => 78,539,816,339,745
10 cell size => 785,398,163,397
Maybe switch your cell size to 100m or more