Message Boards Message Boards

0
|
2628 Views
|
3 Replies
|
1 Total Likes
View groups...
Share
Share this post:

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

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
Posted 3 years ago

Indeed

position = Position[x1, x1 // Select[LessThan[1]] // First] // Flatten // First
(* 2001 *)

Prime[position]
(* 17393 *)
POSTED BY: Rohit Namjoshi

Hi Dr Rohit...the equation above every time it passes from 1 to zero gives the position of the prime number n1, I know there is already a command to give the prime position at least at Wolfram|Alpha, but I think this can be worked out to an unlimited number... thank you so much. Dr Namjoshi.

Posted 3 years ago

Hi Luis,

A couple of ways

x1 // Select[IntegerPart[#] == 0 &]
(* {11598463/11598899, 452114/452339} *)

x1 // Select[LessThan[1]]
(* {11598463/11598899, 452114/452339} *)
POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract