The n-back task is a working memory test in which people watch a stream of items, such as letters, and say whether each one matches the item a set number of steps back (two steps in a 2-back task). Doing it well means constantly updating what you hold in mind while letting go of older items, so it demands steady attention.
Papers That Mention N-Back Task
Four Short Mindfulness Sessions Improved Some Cognitive Test Scores More Than an Audiobook
Can four short meditation lessons sharpen thinking? 49 undergraduates new to meditation either learned breath-focused mindfulness or listened to The Hobbit, in four 20-minute sessions. The meditators improved more on a symbol-coding test, word fluency and runs of correct answers on a working memory task, but not on digit span or speed. Groups were assigned by sign-up week, tests came straight after meditating, and the many tests weren't corrected for multiple comparisons.