This problem is extrapolated from a problem that was solved on how to manipulate lists of set outputs as a union ( Equation Autogeneration ), where the concern now is how to mine for (or attain from the beginning without as much fuss if possible) certain information describing the nature and position of matching quotients between sets of different origin of generation (in that problem, that variable is 'p') but the same divisor ('x').
Lastly I just need certain information on equal elements belonging to sets with the same X dividing into any given set, the specifics of which I explained below. Firstly I modified the equation slightly so something would crop up but it’s pretty straightforward. Moving on with that code and the changed equation we now have input:
Block[{p = #}, (((Binomial[Reverse[Range[((p + 1)/2), (p - 3)]],
Range[(p - 3) - ((p + 1)/2) + 1]]))/(Range[
2, ((p - 3)/2)]))/x /.
Solve[4 + x <= p && 1 + p <= 2 x, Integers]] & /@
Prime@Range[5, 6]
Resulting in output:
{{{2/3, 7/6, 5/6}, {4/7, 1, 5/7}}, {{5/7, 12/7, 2, 1}, {5/8, 3/2, 7/4,
7/8}, {5/9, 4/3, 14/9, 7/9}}}
Sometimes two sets made from different subject-primes p but with the same divisor x will result in the same quotient q (an equivalent element of each set), but with a different order r in either. In this output we are combining as output the sets generated by the 5th and 6th primes, 11 and 13 being divided by the appropriate corresponding x allowed by its domain restriction for all integers therein, resulting in 2 sets possible for 11 (3 elements each) and 3 sets possible for 13 (4 elements each). Between these two sets of sets, which may need to be separated in the calculation despite our combining their output here - instead of doing so is fine - to ease comparison (I’m not sure), we need to compare all elements of sets belonging to different p but with the same divisor x to check for equality.
Assume that such equality can only happen once for a given divisor x (resulting in a pair); there should not be three sets, each of a different p but with the same divisor x, that result in the same quotient present in each set. Since there is always only one set divided by x resulting from any p there shouldn’t be possible any error in matching quotients because they wouldn’t be considered even if present between different sets of the same p, because only those with the same divisor x would be considered. Anyway, the output would look like:
x ( p_1 , r_1 ) ~ ( p_2 , r_2 ) q s
where x is the divisor, p_1 and p_2 are the two subject-primes whose sets contained the matching quotient and (p_2) > (p_1), r_1 and r_2 are the order of the matching quotient in its corresponding (_1 or _2 p set) where the first possible value from left-to-right is 2, q is the matching quotient and element of each set triggering the output, and s = ( r2 – ( r1 + ( ( r2 – r1 ) / 2 ) ) )
.
Thus for our above example we would have an output of
7 ( 11 , 3 ) ~ ( 13 , 5 ) 1
Note that multiple different quotient-matches with the same divisor x may be possible even though multiple matches of the same quotient (like 1 here) should not be possible. List any new matches in the format of the above line in a new line downwards in order of increasing divisor x, so it would look like the below (where 7 in this case would be the first x, (x_1):
7 ( 11 , 3 ) ~ ( 13 , 5 ) 1
x_2 ...
x_3 ...
x_4 ...