Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
15
Task/Fractran/Mathematica/fractran.math
Normal file
15
Task/Fractran/Mathematica/fractran.math
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
fractionlist = {17/91, 78/85, 19/51, 23/38, 29/33, 77/29, 95/23, 77/19, 1/17, 11/13, 13/11, 15/14, 15/2, 55/1};
|
||||
n = 2;
|
||||
steplimit = 20;
|
||||
j = 0;
|
||||
break = False;
|
||||
While[break == False && j <= steplimit,
|
||||
newlist = n fractionlist;
|
||||
isintegerlist = IntegerQ[#] & /@ newlist;
|
||||
truepositions = Position[isintegerlist, True];
|
||||
If[Length[truepositions] == 0,
|
||||
break = True,
|
||||
Print[ToString[j] <> ": " <> ToString[n]];
|
||||
n = newlist[[truepositions[[1, 1]]]]; j++;
|
||||
]
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue