let me get this straight before i spend time scratching away at anything..
you want an algorithm for picking {a[SUB]1 . . . [/SUB]a[SUB]10[/SUB]}
(ordered by magnitude) such that:
( ∑a[SUB]i[/SUB] ) ≡ 0 mod 7
( 2*∑a[SUB]i[/SUB] - a[SUB]1 [/SUB]- a[SUB]2 [/SUB]- a[SUB]3 [/SUB]) ≡ 0 mod 17
right? any other constraints on the a[SUB]i[/SUB]'s other than positive integers?
the calculations you posted are for this problem:
given any nine numbers, find a tenth such that (when ordered least to greatest) they satisfy the conditions above.
is that the problem you want to know an algorithm for?
with two cases for the 10th number either being one of the 3 least or not? any other constraints?
do you care about assuming that 9 of the a[SUB]i[/SUB]'s are given? this makes a difference in the calculation of the probability of a random sequence meeting the criteria.
honestly i'm more interested in checking the odds. but number theory's fun too; i can dig it.
you want an algorithm for picking {a[SUB]1 . . . [/SUB]a[SUB]10[/SUB]}
(ordered by magnitude) such that:
( ∑a[SUB]i[/SUB] ) ≡ 0 mod 7
( 2*∑a[SUB]i[/SUB] - a[SUB]1 [/SUB]- a[SUB]2 [/SUB]- a[SUB]3 [/SUB]) ≡ 0 mod 17
right? any other constraints on the a[SUB]i[/SUB]'s other than positive integers?
the calculations you posted are for this problem:
given any nine numbers, find a tenth such that (when ordered least to greatest) they satisfy the conditions above.
is that the problem you want to know an algorithm for?
with two cases for the 10th number either being one of the 3 least or not? any other constraints?
do you care about assuming that 9 of the a[SUB]i[/SUB]'s are given? this makes a difference in the calculation of the probability of a random sequence meeting the criteria.
honestly i'm more interested in checking the odds. but number theory's fun too; i can dig it.