Hello
Do you always want the order number - number - x?
You can find some n-back programs on Pavlovia that you can use as a starting point. Searching the forum will also give you some ideas for an n-back task. At PsychoPy Online Demos you can find an implementation of an n-back task.
Best wishes Jens