OFFSET
1,1
COMMENTS
Starting at the second prime 3, solutions are obtained to the Equation
x+y*n=Prime[m-1]
or
n=(Prime[m-1]+x)/y
Either n*Prime[m]/or n*Prime[m+1] is an Integer.
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.
The resulting numbers are made positive and sorted for magnitude
to give the output sequence.
This sequence is an effort to get some sequence related by the primes:
{Prime[m-1],Prime[m],Prime[m+1]}
by
Prime[m]x+Prime[m+1]*y=Prime[m-1]
REFERENCES
A Course in Computational Number Theory by Bressoud and Wagon,2001
FORMULA
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.
MATHEMATICA
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]]]
CROSSREFS
KEYWORD
nonn,uned
AUTHOR
Roger L. Bagula, Mar 26 2008
STATUS
approved