# How to remove the list bracket in some expression?

I have two problems with the List bracket {}.

First, I want to get a specific component of LeviCivitaTensor, so I should use

Normal[ LeviCivitaTensor[n] ] [[ i1, i2, i3, ..., in ]]


For other purpose, however, I need to use

Normal[ LeviCitaTensor[n] ] [[ Table[ i[j], {j, 1, n}] ]]


However, the Table gives an additional List bracket "{}", and my method won't work.

Second, I want to calculate

Sum[f, {i[1], 1, n}, {i[2], 1, n}, ..., {i[m], 1, n}]


However, m in my function is an input, so I use Sum[f, Table[{i[j], 1, n}, {j, 1, m}]]. But the Table once again gives rise to an additional List bracket which make my code unworkable.

Can some one help me out? I would appreciate it.

• Have a look at Flatten. – Sjoerd C. de Vries Jun 6 '15 at 17:33
• Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory Tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. – bbgodfrey Jun 6 '15 at 17:38
• Still can't get rid of the {} – xjtan Jun 7 '15 at 3:11
• If I understand what you are trying to do, try adding Sequence@@ in front of your Table expression. – MarcoB Jun 7 '15 at 18:49
• it works. thanks. but need to evaluate first. – xjtan Jun 10 '15 at 4:40

First, you should know that you don't need Normal to index the LeviCivitaTensor:

LeviCivitaTensor[3][[1, 2, 3]]
(* 1 *)


Now to your first problem. This can be solved with Apply (shorthand form @@):

i[1] = 1; (* example i data *)
i[2] = 2;
i[3] = 3;

LeviCivitaTensor[3][[##]] & @@ Table[i[j], {j, 1, 3}]
(* 1 *)


The second problem can be solved similarly. Alternatively, Sequence is an option:

ClearAll[i]

n = 2;
m = 3;

Sum[f, Sequence @@ Table[{i[j], 1, n}, {j, 1, m}] // Evaluate]

Sum[f, ##] & @@ Table[{i[j], 1, n}, {j, 1, m}]

(* 8 f *)
(* 8 f *)

• Oh man you are great, thanks a lot. – xjtan Jun 10 '15 at 4:23