Kitonum

21435 Reputation

26 Badges

17 years, 24 days

MaplePrimes Activity


These are replies submitted by Kitonum

@acer  Thanks for the detailed answer! 

@Kitonum  If you replace the fourth line of code with the following line, the procedure will run faster:

L:=[seq(ithprime(k) $ min(n, floor(a/ithprime(k))), k=1..pi(a))];

@fairuzalwani 

E := [0, 2, 7, 15, 26, 40]:

map(C, [3, 10, 24], [0, 2, 7, 15, 26, 40]);

                           [3, 4, 5]

@Carl Love   

E:= [0,2,7,15,26,40]:

1+ListTools:-BinaryPlace(E, Pi);

   Error, (in ListTools:-BinaryPlace) the 2nd argument should be of type {numeric, string}

@one_man   a := remove(i -> i=x+2, a);

@Markiyan Hirnyk   For earlier versions of Maple yours is not appropriate. For example in M 12

seq(RandomTools[Generate](float(range=-1..1, digits=5, method=uniform)), n=1..20);

       Error, (in RandomTools:-Generate) cannot specify a range crossing the origin

 

So I'm trying to write a version-independent code.

@mahmood180  Yes, I already wrote to you about it.

@mahmood180   Yes, you are right! In the last line of the code replace  M  by  N  (after the sign $) .

What are  а, b  and   in your system?  What are the relations  , , c  with numbers  a1, a2, a3, a4, a5, a6, a7, a8, a9 ?

@Preben Alsholm   Thank you for your response. But still remains unclear what significance has the singularity for this plotting? Why Maple constructs in this way? After all, for any C>0  the curve  1 / (x ^ 2 + y ^ 2) = C  is a circle.

@royadrb8989   What is  G  and which answer you expect?

@Carl Love   You are right. Easy correction of my code gives the same result:

restart;

n:=0:

S:=combinat[permute]([$ 3..14], 5):

for s in S do

F, H, J, K, L:=op(s):

A := 33 - K - L:

B := 1 + F - J:

C := -15 - F + J + K + L:

d := 15 + H - K:

E := 16 - F - H + J + K:

G := 34 - H - J - L:

i := 18 - J - K:

if convert(map(x->is(x>=3 and x<=14), [A,B,C,d,E,G,i]), `and`)  then n:=n+1: M[n]:=[A,B,C,d,E,G,i,F,H,J,K,L]:  fi:

od:

M:=convert(M,list):

remove(x->nops(convert(x,set))<12, M):

nops(%);  # Total number of solutions

                          0

@MiguelJesus 

restart;

n:=0:

S:=combinat[permute]([$ 3..14], 5):

for s in S do

F, H, J, K, L:=op(s):

A := 33 - K - L:

B := 1 + F - J:

C := -15 - F + J + K + L:

d := 15 + H - K:

E := 16 - F - H + J + K:

G := 34 - H - J - L:

i := 18 - J - K:

if  convert(map(x->is(x>=3 and x<=14), [A,B,C,d,E,G,i]), `and`) then n:=n+1: M[n]:=[A,B,C,d,E,G,i,F,H,J,K,L]  fi:

od:

M:=convert(M,list):

nops(M);  # Total number of solutions

M[1..10];

M[-10..-1];

@Axel Vogt   Excellent solution. It is more algorithmic and quicker than mine.

@Axel Vogt   7288<150565 

First 103 104 105 106 107 108 109 Last Page 105 of 132