# How can I match the result of an equation with a previous known result

Posted 13 days ago
157 Views
|
3 Replies
|
1 Total Likes
|
 Hi there to everyone, if someone could help me ... in the program lines below how can i get a table of answers to the formula x1, knowing that i only want results that gives as integerpart =0 ( zero)? sq=Table[j,{j,100000}]; sq11=Table[j,{j,1000,2000}]; x=Select[sq,OddQ,(2002)]; n=Select[sq,PrimeQ,(2002)]; n1=17389; r=0; g=0; x1=(((((n+r)*x)+n+r))/(n+r))/(((((n)*(x+r)+(x+r))))/(n1)) ClearAll@f f[n_,r_,x_] := Module[{x1,b}, x1=(((((n+r)*x)+n+r))/(n+r))/(((((n)*(x+r)+(x+r))))/(n1)); b=IntegerPart[x1]] Table[If[MemberQ[g, f[n]], {n, f[n]}, Nothing], {n, 1, 20000}] 
3 Replies
Sort By:
Posted 13 days ago
 Hi Luis,A couple of ways x1 // Select[IntegerPart[#] == 0 &] (* {11598463/11598899, 452114/452339} *) x1 // Select[LessThan[1]] (* {11598463/11598899, 452114/452339} *) 
 Indeed position = Position[x1, x1 // Select[LessThan[1]] // First] // Flatten // First (* 2001 *) Prime[position] (* 17393 *)