# Sets of k expressions, being k a variable

I need to write something like

Table[Subscript[A,i] = i, {i,5}]

in order to define a set of expressions. All is OK with this, but if I try to left the number of expressions as a variable k...

Table[Subscript[A,i] = i, {i,k}]

... Mathematica doesn't allow that. ¿It is possible to write this kind of k-sized sets of expressions?

• First note Subscript[A,i] = i is not an equation but an affectiation (= is Set, not Equal). Is this really what you want? – user64074 Oct 14 '19 at 11:50
• I think your aim will be achieved simply by Subscript[A,i_]:=i. Then you get it valid for any i. Another story is that this is not an equation in Mathematica. If the expression Subscript[A,i]=i is not an equation in itself, but you simply use the expression Subscript[A,i] somewhere in your code later, this may answer your need. – Alexei Boulbitch Oct 14 '19 at 12:01
• OK, forget then the word "equation", and think on "expression" instead. I need to have this set of expressions, from 1 to k. – Vandermonde Oct 14 '19 at 12:10

newA[k_] := Table[i, {i, k}]