1

I was curious if I can get wolfram alpha to calculate for me the values of Y, but using only the prime integer values of X .

Currently I have the following:

solve y=x+(30/x)+1 over the integers

I would like to do something like this:

solve y=x+(30/x)+1 over the prime integers

OR

solve y=x+(30/x)+1 over the prime numbers

http://www.wolframalpha.com/input/?i=solve+y%3Dx%2B(30%2Fx)%2B1+over+the+integers

So far I am not getting the response I want... which is X=3, and Y=14.

It's simply curiosity from my part whether I can get wolfram to do it.

Menelaos
  • 113

1 Answers1

2

You can find the relevant solutions with the function prime(x), which returns the $x$'th prime number and the syntax solve {y=prime(x)+30/prime(x)+1} over integers (link).

Jam
  • 10,325
  • Annoyingly, this just returns the index, $x$, instead of the prime itself, $p_x$ but it's fairly easy to transition between the two. – Jam Aug 09 '18 at 11:11
  • Would solve {y=x+30/x+1; x = prime(p)} over integers work better? – rrauenza Mar 09 '20 at 21:40