0
|
6562 Views
|
6 Replies
|
3 Total Likes
View groups...
Share
Share this post:
GROUPS:

# [Solved] Print n-th number from list

Posted 10 years ago
 I want to print 2547-th prime number after 982400000. Listing primes from 982400000 to 982500000 is easy: primes between 982400000 and 982500000  But then I need to get 2547-th element from the list and I don't know how. I've tried using take function like this: take[{primes between 982400000 and 982500000},{2547}] take[(primes between 982400000 and 982500000),{2547}] take[primes between 982400000 and 982500000,{2547}]  ...and I've tried part function: Part[primes between 982400000 and 982500000, 2547] Part[{primes between 982400000 and 982500000}, 2547] Part[(primes between 982400000 and 982500000), 2547] {primes between 982400000 and 982500000}[[2547]] (primes between 982400000 and 982500000)[[2547]]  ...but with no success. Any ideas?
6 Replies
Sort By:
Posted 10 years ago
 From now on I will. Thanks for suggesting.
Posted 10 years ago
 It can be a bit subtle to get Wolfram|Alpha to know what one is asking. If it doesn't respond properly to a sensibly phrased query it's always good to submit a report: they are taken seriously and used to update Wolfram|Alpha's parser.
Posted 10 years ago
 Ach. Thanks! I was close though - tried this one as the first guess: 2547th prime from 982400000 
Posted 10 years ago
 This works in Woflram|Alpha 2547th prime after 982400000 http://www.wolframalpha.com/input/?i=2547th+prime+after+982400000
Posted 10 years ago
 It doesn't work in Wolfram|Alpha. I thought that this language works there. It seems I was wrong. Any ideas how to get the result in Wolfram|Alpha?
Posted 10 years ago
 Select[Range[982400000 , 982500000], PrimeQ][[2547]] gives 982451653 
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments