I remember once being put in the hallway for talking too much in a class. I looked up at the ceiling and counted tiles for a bit, but then I started manipulated numbers in my head, to the limited ability available to me as a middle school student. I don't remember any of the specifics, just that it was arithmetic, and that I well enough pleased with my time to myself.
Life has lots of little moments where you are essentially trapped, a lot of them having to do with hospitals, but I never rule out the possibility of being a political prisoner.
I know we use our smart phones with their games and anti-social media for these moments, but I would like to more prepared than that. Also, good luck using your phone in solitary confinement, intubated, when kidnapped for ransom or tied down. I refer to arithmetic as the most rugged beauty, because it can done without any resources, including social ones.
Here is a running list of some mental arithmetic activities for those types of moments.
* turning words into numbers, doing so with a system of (a=1, b=2, . . . z=26).
* finding the digital root. This provides the amusing test of whether the number is a multiple of 3 (or nine).
* converting into binary. I use my fingers to store the digits as I work.
* Goldbach hunting: Once I have a number, find the answers for 1) Every integer greater than 5 can be expressed as the sum of three primes or 2) Every even number greater than 2 can be expressed as the sum of two primes.
Also, there was a time in my life where I had maintained an Anki deck with, along with way too many other things, a lot of historical information by date. For example, it's hard for 79 to come up and me not think about Einstein being born in 1879 (on Pi Day (3 14), no less). Many numbers can trigger a rumination on some historical person or event.
I find calculation to be more satisfying than just counting. (Although counting is a good trick for breaking the trance of television, a trick I picked up from John Michael Greer. Just keep counting how many times the camera angle changes, etc (Cp this)). If I'm ever in a hospital bed with control of a TV, I plan to turn it on just long enough to gather some numbers, or words to convert to numbers, and then use that as the source of calculation and then thinking.