# Sequence of arbitrarily many variables separated by commas? [closed]

I am wondering if it is possible to produce an input such as

x[1],x[2],x[3],...,x[n]


for an arbitrary but fixed amount of n without having to type in every single term by hand. Note that the above is not supposed to be a list, but simply a sequence of variables and commas.

I thought that maybe a conversion of

x[1]+x[2]+x[3]+...+x[n]


to

x[1],x[2],x[3],...,x[n]


could do the trick. Something similar was asked in the question How to replace plus sign by comma but it does not provide the solution I am after, since it produces a list instead of sequence. Is there a convenient way to get such an input sequence in Mathematica? Thanks for any suggestion!

## closed as off-topic by chuy, Bob Hanlon, MarcoB, Michael E2, Mr.Wizard♦Jul 17 '15 at 6:03

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – chuy, Bob Hanlon, MarcoB, Michael E2, Mr.Wizard
If this question can be reworded to fit the rules in the help center, please edit the question.

• Sequence @@ Table[x[i], {i, 1, n}]? – MarcoB Jul 16 '15 at 20:19
• f[n_] := Sequence @@ x /@ Range[n]? – march Jul 16 '15 at 20:20
• They're basically the same answer, but @MarcoB was first, so if he wants to post an answer, he can! – march Jul 16 '15 at 20:32
• This can actually be done without Sequence too: Fold[D, f[x, y, z], {x, y, z}]. – Szabolcs Jul 16 '15 at 20:46
• How about Array? Array[x, n] or Sequence@@Array[x,n] depending on what you are planning on doing with it. – bill s Jul 16 '15 at 23:32