I write the following command. After running for seconds (less than a minute), Mathematica breaks and nothing is displayed. Why?

a = Tuples[{1, I, -I}, {1, 20}]



closed as off-topic by xzczd, gwr, Henrik Schumacher, rhermans, MarcoB May 31 '18 at 13:27

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." – xzczd, gwr, Henrik Schumacher, rhermans, MarcoB
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 6
    $\begingroup$ Please don't add [bugs] tag until the community has confirmed it. And, this is definitely not a bug, you're just out of memory: Table[ByteCount[Tuples[{1, I, -I}, i]]/1024^2., {i, 9, 11}] $\endgroup$ – xzczd May 31 '18 at 12:21
  • $\begingroup$ Thanks. How can I deal with that? $\endgroup$ – A. Mpi May 31 '18 at 12:27
  • 2
    $\begingroup$ That depends. Lazy list is a possible choice: mathematica.stackexchange.com/q/109598/1871 mathematica.stackexchange.com/q/9554/1871 $\endgroup$ – xzczd May 31 '18 at 12:31
  • 1
    $\begingroup$ Your question may be put on-hold as it seems to be off-topic, i.e it arises from a simple mistake (out of memory) and is unlikely to help any future visitors. Don't be discouraged by that cleaning-up policy. Your future good questions are welcome. Learn about common pitfalls here. $\endgroup$ – rhermans May 31 '18 at 12:46
  • $\begingroup$ You can still edit your question and make it about finding a way around the calculation you need. In that case the hold would be removed. $\endgroup$ – rhermans May 31 '18 at 12:48