Hi,
Select[{1, 2, 6, 15, 37, 90, 218, 527, 1273, 3074}, EvenQ]
as well as
Select[{1, 2, 6, 15, 37, 90, 218, 527, 1273, 3074}, OddQ]
do work as expected.
Why does PrimeQ does not work the same way?
Wolfram alpha link to sample
Hermann.
Hi,
Select[{1, 2, 6, 15, 37, 90, 218, 527, 1273, 3074}, EvenQ]
as well as
Select[{1, 2, 6, 15, 37, 90, 218, 527, 1273, 3074}, OddQ]
do work as expected.
Why does PrimeQ does not work the same way?
Wolfram alpha link to sample
Hermann.
In[1]:= Select[{1, 2, 6, 15, 37, 90, 218, 527, 1273, 3074}, PrimeQ]
Out[1]= {2, 37}
Thanks for showing that it works in general.
What I stated is that it does not work in Wolfram Alpha link:
While eg. OddQ does work in Wolram Alpha link:
So is PrimeQ not working in Wolfram Alpha link a Wolfram Alpha bug?
Hermann.
Well, Wolfram|Alpha is not Mathematica and in general, Mathematica syntax does not work with it. W|A has a natural language interface, which makes it possible to ask questions without learning a programming language. But it can also be very frustrating to get it to do what you want (at least I find it very frustrating and unpredictable).
Try telling it to
select primes from {1, 2, 6, 15, 37, 90, 218, 527, 1273, 3074}
Based on the interpretation of this natural language query above, I tried
Select[{1, 2, 6, 15, 37, 90, 218, 527, 1273, 3074}, PrimeQ[#1]&]
which also works.
Thank you, both terms work in Wolfram|Alpha.
And you are right, the natual language interpretation is strange sometimes as this link shows:
select primes from LinearRecurrence[{0,7,0,-7,0,1},{1,2,6,15,37,90},20]
Should have returned the same as your terms, but does something completely different.
I really like Wolfram|Alpha for two reasons:
I know Mathematica is free for Raspberry Pi, but is some “more Mathematica like” web interface than Wolfram/Alpha out there?
Hermann.
I know Mathematica is free for Raspberry Pi, but is some “more Mathematica like” web interface than Wolfram/Alpha out there?
Yes, there is. Take a look at the Programming Cloud. It can be used with a free account, with some limitations. I haven’t looked at it in detail as I do have access to desktop Mathematica, so I’m not sure how severe the limitations are, but on a first glance it appears to be a pretty complete Mathematica-in-the-cloud.
I don’t fully understand how it differs from Mathematica Online (which has no free version so I never tried it). Here’s a thread on that: Wolfram Programming Cloud vs. Mathematica Online
Thank you, programming cloud seems to be more Mathematica still providing much for hobby mathematics oeis.org related investigations!
Hermann.