vv

13977 Reputation

20 Badges

10 years, 36 days

MaplePrimes Activity


These are replies submitted by vv

@Carl Love The replacement is necessary for r>0 too.

@Carl Love 
Thanks. I wonder why the formula was not included somewhere (e.g. in `simplify/Psi` or some convert); maybe it was forgotten.

Your extension is wrong for Psi(r) when r is a negative rational; probably because the original Psi has 2 arguments (or recursive overload problem); it would be interesting to investigate.

Edit. The mistake: (n-1)*(q+1) must be replaced with (n-1)*q+p

Just curious: what's wrong with a .mla update? It used to work well in the past. Is it not the case in "modern Maple"?

@tomleslie Maybe because you are using a 65 bit OS  :-)

@nguyenhuyenag 
The question is what information about f is contained in discriminant(f,[k])?
When such a computation is useful for a polynomial in several variables?

Also, if you try  g:=eval(f, a=d+e) in your last example, it does not terminate.

What are you trying to obtain?
E.g. in your last example, what does discriminant(f, [k]) represent for f?

@afernande1008 

It's a bug in Physics:-diff. Use diff instead.

F:=int(f(x+r(t)), x=0..1):
Physics:-diff(F, r(t)); # bug

                               0
diff( eval(F, r(t)=rt), rt); # OK
                 int(D(f)(x + rt), x = 0 .. 1)
 

@Axel Vogt I don't think so. The function is

f := f0 + r:  # where
f0 := x -> add(- i * sin((i + 1) * x + i), i=1..5):
r := rand(-1. .. 1.):
plot(f, -10 .. 10, numpoints=5000);

and it is practically nowhere continuous. DirectSearch does not try to "clean-up" the noise r().

The program is written in Algol. The syntax is close to Maple, so, if you produce from the pdf a correct text file (with indentation) it should be easy to obtain a Maple version.

@Thomas Richard 

For k=64/81 the polynomial ir reducible:

((3*w - 2)*(162*w^4 - 297*w^3 + 72*w^2 + 48*w + 32))/81

For solvable irreducibles, the values of k=m/n, |m|, |n| <= 100  are: -16/9, 1/81, 25/9, 80/81.

@Thomas Richard 

The value k=1/81 is interesting because the polynomial is irreducible and solve with option explicit works. 

@Carl Love 

Actually Im( ln(1+ z) ) does not have a limit at z=-1. The limit of ln(1+z) at z=-1 is "complex infinity" (denoted by infinity+I*infinity) in Maple.

Note that assuming does not make much difference between `<` and `<=`.

E.g.

limit(z^n, n=infinity) assuming abs(z)<=1; #   0

@David Sycamore 

Probably you have not noticed the new name for the procedure.

SP:= proc(N::posint, p1::prime:= 2)
local S:= Array([p1], datatype= integer[8]), Used:= table([p1= ()]), s, k, p:= p1, i,j,ok;
    for k from 2 to N do
        s:= `+`(convert(p, base, 10)[]);
        p:= s; ok:=false;
        for i do  for j by 2 to 10^i-1 do
            if p::prime and Used[p]<>() then ok:=true; break fi;
            p:= Scale10(s, i) + j;
        od; if ok then break fi;
        od;
        S(k):= p; Used[p]:= ()
    od;
    [seq(S)]
end proc:

SP(100);

[2, 23, 5, 53, 83, 11, 29, 113, 59, 149, 1409, 1423, 101, 211, 41, 503, 89, 17, 809, 173, 1103, 509, 1427, 1429, 163, 103, 43, 7, 71, 811, 107, 821, 1109, 1117, 109, 1009, 1013, 521, 823, 13, 47, 1123, 73, 1019, 1129, 131, 523, 1021, 401, 541, 1031, 547, 167, 1433, 1151, 827, 179, 1709, 1721, 1153, 1033, 79, 1601, 829, 19, 1039, 137, 1163, 1171, 1049, 1439, 1723, 139, 1301, 557, 1733, 1447, 1607, 1451, 1181, 1187, 1741, 1303, 701, 839, 2003, 563, 1453, 1307, 1193, 1459, 191, 11003, 569, 2011, 409, 1319, 1471, 1321, 709]

(1)

SP(100, 3);

[3, 31, 41, 5, 53, 83, 11, 2, 23, 59, 149, 1409, 1423, 101, 29, 113, 503, 89, 17, 809, 173, 1103, 509, 1427, 1429, 163, 103, 43, 7, 71, 811, 107, 821, 1109, 1117, 109, 1009, 1013, 521, 823, 13, 47, 1123, 73, 1019, 1129, 131, 523, 1021, 401, 541, 1031, 547, 167, 1433, 1151, 827, 179, 1709, 1721, 1153, 1033, 79, 1601, 829, 19, 1039, 137, 1163, 1171, 1049, 1439, 1723, 139, 1301, 557, 1733, 1447, 1607, 1451, 1181, 1187, 1741, 1303, 701, 839, 2003, 563, 1453, 1307, 1193, 1459, 191, 11003, 569, 2011, 409, 1319, 1471, 1321]

(2)

 


Download SP.mw

SP:= proc(N::posint, p1::prime:= 2)
local S:= Array([p1], datatype= integer[8]), Used:= table([p1= ()]), s, k, p:= p1, i,j,ok;
    for k from 2 to N do
        s:= `+`(convert(p, base, 10)[]);
        p:= s; ok:=false;
        for i do  for j by 2 to 10^i-1 do
            if p::prime and Used[p]<>() then ok:=true; break fi;
            p:= Scale10(s, i) + j;
        od; if ok then break fi;
        od;
        S(k):= p; Used[p]:= ()
    od;
    [seq(S)]
end proc:

 

First 41 42 43 44 45 46 47 Last Page 43 of 176