Basic Examples (2)
Basic Examples
(2)
Select from the list those permutations that form a prime when concatenating the digits:
{5,6,7,8,9}
In[13]:=
Out[13]=
{{5,6,8,9,7},{5,7,6,8,9},{5,8,6,7,9},{5,8,9,6,7},{6,5,7,8,9},{6,7,5,8,9},{6,8,5,9,7},{6,9,8,5,7},{7,5,6,8,9},{7,5,8,6,9},{7,8,5,6,9},{8,6,5,7,9},{8,9,5,6,7},{8,9,6,5,7},{9,6,5,8,7},{9,6,8,5,7}}
Select those permutations having length 3:
In[14]:=
Out[14]=
{{5,6,9},{5,8,7},{6,5,9},{7,6,9},{8,5,7},{8,5,9},{9,6,7}}
Select those permutations having length 3–4:
In[15]:=
Out[15]=
{{5,6,9},{5,8,7},{6,5,9},{7,6,9},{8,5,7},{8,5,9},{9,6,7},{5,6,8,9},{5,8,6,7},{5,8,6,9},{5,8,7,9},{5,8,9,7},{5,9,8,7},{6,8,5,7},{7,5,8,9},{8,5,9,7},{9,5,8,7},{9,8,5,7}}
———
Select permutations of for which the first two elements and the last elements add up to the same value:
{1,2,3,4}
In[72]:=
Out[72]=
{{1,4,2,3},{1,4,3,2},{2,3,1,4},{2,3,4,1},{3,2,1,4},{3,2,4,1},{4,1,2,3},{4,1,3,2}}
Scope (1)
Scope
(1)
Applications (2)
Applications
(2)
Properties and Relations (3)
Properties and Relations
(3)
Possible Issues (2)
Possible Issues
(2)