This is how my brain works it out --
A /23 has two /24's
A /22 has two /23's (4 /24s)
A /21 has two /22 (8 /24's)
I make it a point to say you will only 255, 254, 248, 240, 224, 192, 128, or 0 in a subnet mask (a fast way to eliminate wrong answers on a Cisco exam).
For students, I use the full dotted quad, for me I just use the last 9 values
/32 255.255.255.255
/31 255.255.255.254
/30 255.255.255.252
/29 255.255.255.248
/28 255.255.255.240
/27 255.255.255.224
/26 255.255.255.192
/25 255.255.255.128
/24 255.255.255.000
/23 255.255.254.000
/22 255.255.252.000
/21 255.255.248.000
/20 255.255.240.000
/32 255
/31 254
/30 252
/29 248
/28 240
/27 224
/26 192
/25 128
/24 0
/23 254.0
/22 252.0
/21 248.0
/20 240.0