Message Boards Message Boards

0
|
2595 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Solving an equation that involves primes in Wolfram|Alpha?

Posted 2 years ago

I tried this input, hoping to see returned x=7 as a solution:

solve PrimeQ(x-2) || PrimeQ(x-6)) for x<10

Result returned was: False x<10

How might I reform this to see the result I seek?

POSTED BY: Bill McEachen
2 Replies
Posted 2 years ago

Yes, that is better, I really appreciate it.

POSTED BY: Bill McEachen
Posted 2 years ago

Try

Select[Range[9],PrimeQ[#-2]||PrimeQ[#-6]&]

and see how WolframAlpha interprets that.

That is using a couple of Mathematica functions that WolframAlpha seems to understand and translates into WolframAlpha notation.

POSTED BY: Bill Nelson
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