The Raster Calculator only operates on a single cell at a time and is not able to be used to perform this operation.
The Focal Filters operate on a window that you can customise, but are not flexible enough to be used for this purpose.
I have implemented a "Declutter" processing operation in ProRaster Scientific which Lisa was able to use to perform this operation.
The Declutter operation uses a user-defined window of NxN cells and, at each valid cell, will invalidate the cell if it cannot find a user-defined minimum number of valid cells in the window centred on the cell. It can perform multiple passes, as invalidating cells may lead to others being invalidated in a subsequent pass.
You can buy ProRaster Scientific on the Microsoft Store.
------------------------------
Sam Roberts
Founder, Roberts Geospatial Engineering
Australia
------------------------------