(--------)
Hello A.,
Yes you can, with <math> or <latex> as:
@startuml Alice -> Bob : <math>x_n</math> Alice -> Bob : <math>x_{n + 1}</math> @enduml
See documentation here:
Regards,Th.
And without math or latex, you can just use:
@startuml Alice -> Bob : x<sub>n</sub> Alice -> Bob : x<sub>n + 1</sub> @enduml