Items tagged with prime prime Tagged Items Feed


I was wondering why there is difference in computer speed between two almost the same calculations.


61! + 1 costs 271 sec and 59! + 1 almost 0? Why is that? When there are small prime factors, the

calculation goes often faster, why? hanks in advance!

Dear mapleprimes users,

I have a problem with this function:

B is the length of my array

A := Array(1..B,0);

for i from 1 to B do
p = nextprime(i)

a = primroot(p)

A[i] := A[i] + convert((Usage(mlog(b,a,p,method=indcalc), output=[cputime,output],quiet)[1],decimal,15))
end do;


My idea is to create an array A with all the CPUtimes from the 1st prime til the Bth prime, and then plot it.

But my problem is that I get an error; Illegal use of an object as a name.

I don`t know what to do could you help me?





How do I use msolve to solve y^2 + y - 11=0 in Zp for all primes p with 41=< p =<107 ?

Also, using the results make a conjecture describing the primes p for which there are solutions to y^2 + y - 11 = 0 in Zp

This was what I did.


msolve(y^2 + y - 11=0, p)

but I received this error, no implementation of msolve matches the arguments in call, msolve(y^2 + y - 11=0, p)

Any help is appreciated. Thanks

if given a prime ideal p, is it possible to find back possible ideal A which output this prime ideal

such that p*A = 0



Nm= p1. p2 + 1, for m more than or equals 1.


So N1 = p1 + 1 = 2 + 1 = 3, N2 = p1 p2 + 1 = 2  3 + 1 = 7, etc.


We prove that Nm is not divisible by any of p1, p2, . . . , pm, so that Nm is either a prime or it is divisible by a prime larger than pm.


(c) Use Maple to find out which of these numbers Nm, for m = 1, 2, . . . , 15, is actually prime.


Use Maple to compare pm with the smallest prime number that divides Nm, for m =1, 2, . . . , 15.


I`ve written this program:

It determines the power of the Ithfactor, only one problem. When I try to compute the factor of 512 I get 2_2 (subscript) which is extremly stupid. I want to know how I can change my program so that it can give the power of every ith factor. Thanks!


I`m using this program to find the largest prime factor:

Problem: If I insert largest_prime(p^n), where p is prime, it returns n. Which I dont want! I want p to be returned.

Please help me!


Why can't maple 15 solve this eqn. [n= 10]



What is the command to get a sequence of the first twenty prime numbers

Find the product of the square root of all prime numbers less than 100.
Hint: The function isprime determines the primality of an integer.

I've been given a question:

Let pn denote the nth prime number. Then p1 = 2, p2 = 3, p3 = 5, p4 = 7, p5 = 11, . . . .

It is known that the infinite sum 1/p1 + 1/p2 + 1/p3 + · · · + 1/pn + · · · = infinity.

Find the smallest positive integer N so that 1/p1 + 1/p2 +1/p3 + · · · + 1/pN−1 + 1/pN > e. [Hint : ithprime(n) generates the nth prime number.]

How do I start off?

Many thanks!

I dont know what to do any further...

I have some function containing HeunG as a function

it is of the following form

f(k)=argument(functions containing HeunG) - ln(2)*k

now plotting this works...

But when differentiating with respect to k and then plotting it gives me the following message:

Warning, expecting only range variable k in expression (I*((1/2)^(1/2*I*k))^2*HeunG(3,-9/2+3/4*I*k-3/4*k^2,-1+1/2*I*k,-1/2+1/2*I*k,1/2,1+I*k,1/2...


I have enjoyed Maple computer algebra system as a platform for some work on prime constellations.  A summary of my work is here -

At the bottom of the page are 3 relevant files and the filenames start with "A constellation"  Two of those files are .mw files.  The code searches the integers for solutions, and it works fine, but after about half a day, it consistantly crashes.  I...

Hi. Can anyone help me with getting all the prime numbers from 1 to 2000 in maple with "from 1 by 1 to 2000 do" and maybe use "if"? How do i make this?

1 2 Page 1 of 2