The Table[ ] command usually returns a list with the same cardinality of its iterator.
Table[i, {i,4}]
(*
->{1,2,3,4}
*)
It is easy to show that is possible to return a list with a greater cardinality than the iterator
Table[Sequence @@ ConstantArray[1, i], {i, 2}]
(*
->{1,1,1}
*)
But … Are there ways to return a list with LESS cardinality than the iterator?
A simple example:
This need not always return a list with smaller cardinality. For e.g.,
{i,3}returns equal and{i,4}returns more.Or an even sillier example would be
but I don’t know if it counts.
You could also use
PiecewiseinsideTable