pimp88z

15 Reputation

3 Badges

10 years, 261 days

MaplePrimes Activity


These are questions asked by pimp88z

Dear Maple users,

My problem is as follows:

I have a factor base [2,3,5,7,11,33,34,35,36,37,38,39,40]

The numbers from 2 till 11 are primes, the rest is not. 

Then I have to factor (H+c1)(H+c2) in numbers of the factor base , where c1 and c2 go from 1 to some pre-defined limit. H=32 in my case.
And then I have to put the powers of the numbers of the factor base in a matrix. For example: (H+1)(H+1)=33² but also (H+1)(H+1)=3²*11².

That will become in matrix form [0 , 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0 ] but also (!) [0 , 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0 ].

This is not what I want! I want no double representations....

What I want is that (H+c1)(H+c2) should be represented in primes in the matrix if possible and else just represented as the other numbers.

 

hope you guys can help me!

Hi,

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!

Hey guys,

I have a problem with this code:

d := Array(1 .. 15);

for i to s1 do

for c2 to 15 do

if `mod`(c2+(J+H)*(`mod`(1/(H+1), A[i])), A[i]) = 0 then d[c2] := d[c2]+l(A[i]) else d[c2] := d[c2]end if

end do

end do;

d;

The problem is that my code stops running when I encounter that `mod`(1/(H+1), A[i]) doesn`t have an modular inverse. What I would like to have is that the loop just continues and does nothing when my array when it encounters an error.

Hope you can help me!

1 2 Page 2 of 2