%I #3 Mar 30 2012 17:34:23
%S 2,4,5,6,9,20,33,35,42,44,57,68,104,114,117,119,145,174,279,301,310,
%T 322,345,376,410,430,517,533,590,649,740,777,976,1159,1537,1590,2345,
%U 2412
%N Solutions of an a*x+b*y=c Prime Diophantine Equation: Prime[m]x+Prime[m+1]*y=Prime[m-1] : as Abs[n*Prime[m]] Or Abs[n*Prime[m+1]] in x+y*n=Prime[m-1].
%C Starting at the second prime 3, solutions are obtained to the Equation
%C x+y*n=Prime[m-1]
%C or
%C n=(Prime[m-1]+x)/y
%C Either n*Prime[m]/or n*Prime[m+1] is an Integer.
%C using the Wagon Diophantine solver Module for n and then the specific prime that it is a rational number of is multiplied out to give an Integer.
%C The resulting numbers are made positive and sorted for magnitude
%C to give the output sequence.
%C This sequence is an effort to get some sequence related by the primes:
%C {Prime[m-1],Prime[m],Prime[m+1]}
%C by
%C Prime[m]x+Prime[m+1]*y=Prime[m-1]
%D A Course in Computational Number Theory by Bressoud and Wagon,2001
%F a[out]=Abs[If[ IntegerQ[n*Prime[m+1]],n*Prime[m+1] else n*Prime[m]]] where n is a rational number: n=(Prime[m-1]+x)/y Sequence is sorted by magnitude.
%t Clear[n, m, l] DiophantineSolve[{a_, b_}, c_, n_] := Module[{d, e}, {d, e} = ExtendedGCD[a, b]; If[Mod[c, d] == 0, Transpose[{c*e, {b, -a}}/d].{1, n}, {}]]; a = Table[Table[Simplify[If[l == 2,Prime[m], Prime[m + 1]]*(n /. Solve[DiophantineSolve[{Prime[m], Prime[m + 1]}, Prime[m - 1], n][[l]] - Prime[m - 1] == 0, n])], {l, 2, 1, -1}], {m, 2, 20}]; Union[Abs[Flatten[a]]]
%K nonn,uned
%O 1,1
%A _Roger L. Bagula_, Mar 26 2008
|