Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
15
Task/Fractran/Mathematica/fractran-1.math
Normal file
15
Task/Fractran/Mathematica/fractran-1.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