It looks like the following code should work, and allow it spits out error messages saying I have too many arguments, the code spit out after the error message looks like exactly what I want to calculate, but it won't give the answers. Completely stumped here...
list[b_, c_] := Table[{a, b, c}, {a, 0, c - 1}];
list2 = Tuples[Table[list[Prime[8], c], {c, 5, 7}]];
list3[a_, b_, c_] := Union[
Range[a, b, Prime[c]],
Range[a + 2, b, Prime[c]]]
list4 = Union @@@ Apply[list3, list2, {2}];
Apply[Differences, list4, 1]
Here's the output:
{Differences[0, 2, 11, 13, 15, 17, 19],
Differences[0, 1, 2, 3, 11, 13, 15, 18],
Differences[0, 2, 4, 11, 13, 15, 19],
Differences[0, 2, 3, 5, 11, 13, 15],
Differences[0, 2, 4, 6, 11, 13, 15],
Differences[0, 2, 5, 7, 11, 13, 15],...
Those are the differences I want. How do I get it to spit them out?
Map[Differences, list4]
or justDifferences/@list4
$\endgroup$