Jabz

433 Reputation

5 Badges

14 years, 290 days

MaplePrimes Activity


These are replies submitted by Jabz

k thnk u for ur assistance

k thnk u for ur assistance

"f:=GAMMA@curry(`+`,1);"

what is this function GAMMA doing "GAMMA( n ) = (n-1)!" the function still contains !. Is there no way writing
a proc without the ! init?

"f:=GAMMA@curry(`+`,1);"

what is this function GAMMA doing "GAMMA( n ) = (n-1)!" the function still contains !. Is there no way writing
a proc without the ! init?

I am very grateful 4 ur assistance thank you.

 

I have a new problem and i am not sure how to tackle it.

Q. Write a procedure to give the factorial of n without using the built in function !.

 

I am not sure how to implement n*(n-1)*(n-2).......*(n-n) because  (n-n) is 0 which will turn everything to 0???

 

I am very grateful 4 ur assistance thank you.

 

I have a new problem and i am not sure how to tackle it.

Q. Write a procedure to give the factorial of n without using the built in function !.

 

I am not sure how to implement n*(n-1)*(n-2).......*(n-n) because  (n-n) is 0 which will turn everything to 0???

 

Thank u i was trying to use modp(a,b) but didn't succeed. This method seems much easier thank u again.

Thank u i was trying to use modp(a,b) but didn't succeed. This method seems much easier thank u again.

Thank you very much for all your help. I was really lost but now i think i know what i have to do lol thank you again.

Thank you very much for all your help. I was really lost but now i think i know what i have to do lol thank you again.

what can i use as n (instead off (mod 33)) for it to work with ASCII code?

what can i use as n (instead off (mod 33)) for it to work with ASCII code?

Q1)Where do i add 99?

 

is it to F(33,7,X)?

 

Q2)And why do i get the following when i try to convert F(33,3,L) into bytes?

L:=parse(readline(outputfile));

F:=(n,e,L)->map(x->x^e mod n,L):
X:=F(33,3,L);
convert(%,bytes);
 

 

                    [70, 117, 99, 107, 32, 89, 111, 117]
                       [31, 24, 0, 17, 32, 23, 12, 24]
                                    ""
 

Q1)Where do i add 99?

 

is it to F(33,7,X)?

 

Q2)And why do i get the following when i try to convert F(33,3,L) into bytes?

L:=parse(readline(outputfile));

F:=(n,e,L)->map(x->x^e mod n,L):
X:=F(33,3,L);
convert(%,bytes);
 

 

                    [70, 117, 99, 107, 32, 89, 111, 117]
                       [31, 24, 0, 17, 32, 23, 12, 24]
                                    ""
 

 

Why don't i get the original list ([104, 101, 108, 108, 111]) when i use F(33,7,X). It shoud decrypt the list shouldn't it?

 

restart:
document:= "C:\\Users\\x\\Desktop\\Hello.txt":
outputfile:= "C:\\Users\\x\\Desktop\\test3.txt":
readbytes(document, infinity);
fprintf(outputfile,"%a",%);
close(document, outputfile);

                          [104, 101, 108, 108, 111]
                                     25
L:=parse(readline(outputfile));
convert(%,bytes);
close(outputfile);
                          [104, 101, 108, 108, 111]
                                   "hello"
F:=(n,e,L)->map(x->x^e mod n,L):
X:=F(33,3,L);
                              [26, 8, 3, 3, 12]
F(33,7,X);
                              [5, 2, 9, 9, 12]

5 6 7 8 9 Page 7 of 9