Union[FullSimplify[Flatten[
Table[Sum[Exp[2 \[Pi] I Subscript[n, i]/5], {i, 0, 6}],
{Subscript[n, 0], 0, 4}, {Subscript[n, 1], 0, 4},
{Subscript[n, 2], 0, 4}, {Subscript[n, 3], 0, 4},
{Subscript[n, 4], 0, 4}, {Subscript[n, 5], 0, 4},
{Subscript[n, 6], 0, 4}]]]]
This Table goes through a lot of redundant calculations, blows up unnecessarily and then throws them away. Is there a more efficient way to just generate unique values of this kind?
All I'm trying to do here is to generate a list of complex points that can be expressed as arbitrary sums of, in this case, six fifth roots of unity.
That job still finished in a reasonable amount of time, but I'd like to do the same thing for a higher number of higher-order roots of unity.
Ideally, I'd like to be able to generate the generic limiting pattern, if it exists, for an infinite number of n-order roots. - for 2nd, 3rd, 4th and 6th order roots that generates, respectively, all integers, a triangular grid, a square grid and another triangular grid. I wonder how cases look like that can't have such regular grids - so any other Integer, essentially.
_
and ensuring correct syntax in general. $\endgroup$FullForm
obfuscation is not optimal (you could format it for easy reading yet), but incorrect code is much worse still. BTW, your code is still not working. Copy and paste back into your session to make sure it works. $\endgroup$code
block $\endgroup$