David Sycamore

95 Reputation

4 Badges

5 years, 352 days

MaplePrimes Activity

These are questions asked by David Sycamore

ithprime(n)  gives the unique prime whose index is n, thus ithprime(10) returns 29. Question: is there an inverse function in Maple, which given prime p would return n such that ithprime(n) = p?

Or if no such function exists can anyone suggest a way such a function could be coded?

Thanks in advance


If you type ithprime (10^7) and hit return, the answer 179424673 is returned instantaneously, but if you do ithprime(10^8) there is no answer in ~ one hour plus (and maybe never), it just says “evaluating” and no answer comes. I have done calculations in Maple where the answer was a prime with ~18,000 digits yet cannot get beyond ithprime(10^7) when writing a code that needs to work up the prime list, looking for a particular one. Has anyone else encountered this apparent limitation in Maple?

Is there a way around it? 

I am writing a code which for various discrete x values needs to import from a pre established file,  values of f(x), which must be used for the present calculation, then forgotten. Is there any way I can set this up in Maple? If so I would be much obliged to learn how to do it. I have ~100 data pairs (x,f(x)), with no formula. 

Thanks in advance


I am working with sequences and sometimes need to calculate the sum of prime factors (with multiplicity) of a number n. Example, n=12, answer = 2+2+3 = 7.

Any suggestions?



1 2 3 4 5 Page 5 of 5