Adam Ledger

Mr. Adam Ledger

360 Reputation

11 Badges

9 years, 125 days
unemployed
hobo
Perth, Australia

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are questions asked by Adam Ledger

The only difference between the code that works and the code that doesnt, is that in one Identity is rearranged to as such that the rhs is 0, i am really really curious to work out why this occurs, the only difference is that one evaluates to 1/2=1/2, and the other evaluates to 0=0, but i dont see why maple would return one of those evaluations as false
 

``

 

 

delta(x, y) = piecewise(x = y, 1, x <> y, 0)

 

{x}*is*the*fractional*part*of*x

 

``

 

 

`&Mscr;`(p, q) = {`mod`(p, q)+(1/4)*q*(q-1)}

"`&Dscr;`(q)="
1-(delta({(1/4)*q}, 0)+delta({(1/4)*q}, 0))+delta({(1/4)*q}, 0)*delta({(q-1)*(1/4)}, 0)+1/2*(delta({(q-2)*(1/4)}, 0)+delta({(1/4)*q}, 0)-delta({(q-2)*(1/4)}, 0)*delta({(q-3)*(1/4)}, 0))

 

 

CONJECTURE: c`in`(p, q, nonnegint^2)", `&Mscr;`(p,q)=`&Dscr;`(q)"

 

CHALLENGE: FIND: `in`(p, q, integer^2*such*that*`&Mscr;`(p, q)) and integer^2*such*that*`&Mscr;`(p, q) <> `&Dscr;`(p, q)

 

 

2, 3, 6, 7, 10, 11, 14, 15, 18, 19

 

{`mod`(p[i], p[j])+(1/4)*p[j]*(p[j]-1)} = 1-delta({(1/4)*p[j]}, 0)-delta({(p[j]-1)*(1/4)}, 0)+delta({(1/4)*p[j]}, 0)*delta({(p[j]-1)*(1/4)}, 0)+1/2*(delta({(p[j]-2)*(1/4)}, 0)+delta({(p[j]-3)*(1/4)}, 0)-delta({(p[j]-2)*(1/4)}, 0)*delta({(p[j]-3)*(1/4)}, 0))

 

 

{`mod`(p[i], p[j])+(1/4)*p[j]*(p[j]-1)} = 1-delta({(1/4)*p[j]}, 0)-delta({(p[j]-1)*(1/4)}, 0)+delta({(1/4)*p[j]}, 0)*delta({(p[j]-1)*(1/4)}, 0)+1/2*(delta({(p[j]-2)*(1/4)}, 0)+delta({(p[j]-3)*(1/4)}, 0)-delta({(p[j]-2)*(1/4)}, 0)*delta({(p[j]-3)*(1/4)}, 0))

2, 3, 6, 7, 10, 11, 14, 15, 18, 19

Numbers congruent to 2 or 3 mod 4.

 

NULL

NULL

WHEN ALL TERMS ARE PLACED ON THE LHS AND 0 ON THE OTHER, THE OUTPUT PLACES ALL p,q IN THE SET T, AS I EXPECTED.

restart; S := {}; with(combinat); with(numtheory); T := {}; F := {}; C := {}; AlphaTotal := {}; BetaTotal := {}

delta := proc (x, y) options operator, arrow; piecewise(x = y, 1, x <> y, 0) end proc

Identity := proc (p, q) options operator, arrow; frac(`mod`(p, q)+(1/4)*q*(q-1))+delta(frac((1/4)*q), 0)+delta(frac((1/4)*q-1/4), 0)-delta(frac((1/4)*q), 0)*delta(frac((1/4)*q-1/4), 0)+(1/2)*delta(frac((1/4)*q-1/2), 0)+(1/2)*delta(frac((1/4)*q-3/4), 0)-(1/2)*delta(frac((1/4)*q-1/2), 0)*delta(frac((1/4)*q-3/4), 0)-1 = 0 end proc

NULL

GenerateOddPrimeNumberPairs := proc (N) options operator, arrow; choose([seq(ithprime(k), k = 1 .. N)], 2) end proc

AssignToTrueOrFalseSet := proc (x, y) global T, F; if is(Identity(x, y)) = true then T := `union`({[x, y]}, T) else F := `union`({[x, y]}, F) end if end proc

QueryIdentity := proc (N) local P, k; P := GenerateOddPrimeNumberPairs(N); for k to nops(P) do AssignToTrueOrFalseSet(P[k][1], P[k][2]) end do end proc

QueryIdentity(20); T; F

{[2, 3], [2, 5], [2, 7], [2, 11], [2, 13], [2, 17], [2, 19], [2, 23], [2, 29], [2, 31], [2, 37], [2, 41], [2, 43], [2, 47], [2, 53], [2, 59], [2, 61], [2, 67], [2, 71], [3, 5], [3, 7], [3, 11], [3, 13], [3, 17], [3, 19], [3, 23], [3, 29], [3, 31], [3, 37], [3, 41], [3, 43], [3, 47], [3, 53], [3, 59], [3, 61], [3, 67], [3, 71], [5, 7], [5, 11], [5, 13], [5, 17], [5, 19], [5, 23], [5, 29], [5, 31], [5, 37], [5, 41], [5, 43], [5, 47], [5, 53], [5, 59], [5, 61], [5, 67], [5, 71], [7, 11], [7, 13], [7, 17], [7, 19], [7, 23], [7, 29], [7, 31], [7, 37], [7, 41], [7, 43], [7, 47], [7, 53], [7, 59], [7, 61], [7, 67], [7, 71], [11, 13], [11, 17], [11, 19], [11, 23], [11, 29], [11, 31], [11, 37], [11, 41], [11, 43], [11, 47], [11, 53], [11, 59], [11, 61], [11, 67], [11, 71], [13, 17], [13, 19], [13, 23], [13, 29], [13, 31], [13, 37], [13, 41], [13, 43], [13, 47], [13, 53], [13, 59], [13, 61], [13, 67], [13, 71], [17, 19], [17, 23], [17, 29], [17, 31], [17, 37], [17, 41], [17, 43], [17, 47], [17, 53], [17, 59], [17, 61], [17, 67], [17, 71], [19, 23], [19, 29], [19, 31], [19, 37], [19, 41], [19, 43], [19, 47], [19, 53], [19, 59], [19, 61], [19, 67], [19, 71], [23, 29], [23, 31], [23, 37], [23, 41], [23, 43], [23, 47], [23, 53], [23, 59], [23, 61], [23, 67], [23, 71], [29, 31], [29, 37], [29, 41], [29, 43], [29, 47], [29, 53], [29, 59], [29, 61], [29, 67], [29, 71], [31, 37], [31, 41], [31, 43], [31, 47], [31, 53], [31, 59], [31, 61], [31, 67], [31, 71], [37, 41], [37, 43], [37, 47], [37, 53], [37, 59], [37, 61], [37, 67], [37, 71], [41, 43], [41, 47], [41, 53], [41, 59], [41, 61], [41, 67], [41, 71], [43, 47], [43, 53], [43, 59], [43, 61], [43, 67], [43, 71], [47, 53], [47, 59], [47, 61], [47, 67], [47, 71], [53, 59], [53, 61], [53, 67], [53, 71], [59, 61], [59, 67], [59, 71], [61, 67], [61, 71], [67, 71]}

 

{}

(1)

BUT WHEN THE EQUALITY IS DEFINED AS FOLLOWS, SOME RESULTS ARE PLACED IN THE F SET. (INDICATING THE EQUALITY FOR ALL [p,q] is FALSE)

restart; S := {}; with(combinat); with(numtheory); T := {}; F := {}; C := {}; AlphaTotal := {}; BetaTotal := {}

delta := proc (x, y) options operator, arrow; piecewise(x = y, 1, x <> y, 0) end proc

Identity := proc (p, q) options operator, arrow; frac(`mod`(p, q)+(1/4)*q*(q-1)) = 1-delta(frac((1/4)*q), 0)-delta(frac((1/4)*q-1/4), 0)+delta(frac((1/4)*q), 0)*delta(frac((1/4)*q-1/4), 0)+(1/2)*delta(frac((1/4)*q-1/2), 0)+(1/2)*delta(frac((1/4)*q-3/4), 0)-(1/2)*delta(frac((1/4)*q-1/2), 0)*delta(frac((1/4)*q-3/4), 0) end proc:

``

GenerateNumberPairs := proc (N) options operator, arrow; choose([seq(ithprime(k), k = 1 .. N)], 2) end proc:

AssignToTrueOrFalseSet := proc (x, y) global T, F; if is(Identity(x, y)) = true then T := `union`({[x, y]}, T) else F := `union`({[x, y]}, F) end if end proc:

QueryIdentity := proc (N) local P, k; P := GenerateNumberPairs(N); for k to nops(P) do AssignToTrueOrFalseSet(P[k][1], P[k][2]) end do end proc:

QueryIdentity(20):

{[2, 5], [2, 13], [2, 17], [2, 29], [2, 37], [2, 41], [2, 53], [2, 61], [3, 5], [3, 13], [3, 17], [3, 29], [3, 37], [3, 41], [3, 53], [3, 61], [5, 13], [5, 17], [5, 29], [5, 37], [5, 41], [5, 53], [5, 61], [7, 13], [7, 17], [7, 29], [7, 37], [7, 41], [7, 53], [7, 61], [11, 13], [11, 17], [11, 29], [11, 37], [11, 41], [11, 53], [11, 61], [13, 17], [13, 29], [13, 37], [13, 41], [13, 53], [13, 61], [17, 29], [17, 37], [17, 41], [17, 53], [17, 61], [19, 29], [19, 37], [19, 41], [19, 53], [19, 61], [23, 29], [23, 37], [23, 41], [23, 53], [23, 61], [29, 37], [29, 41], [29, 53], [29, 61], [31, 37], [31, 41], [31, 53], [31, 61], [37, 41], [37, 53], [37, 61], [41, 53], [41, 61], [43, 53], [43, 61], [47, 53], [47, 61], [53, 61], [59, 61]}

 

{[2, 3], [2, 7], [2, 11], [2, 19], [2, 23], [2, 31], [2, 43], [2, 47], [2, 59], [2, 67], [2, 71], [3, 7], [3, 11], [3, 19], [3, 23], [3, 31], [3, 43], [3, 47], [3, 59], [3, 67], [3, 71], [5, 7], [5, 11], [5, 19], [5, 23], [5, 31], [5, 43], [5, 47], [5, 59], [5, 67], [5, 71], [7, 11], [7, 19], [7, 23], [7, 31], [7, 43], [7, 47], [7, 59], [7, 67], [7, 71], [11, 19], [11, 23], [11, 31], [11, 43], [11, 47], [11, 59], [11, 67], [11, 71], [13, 19], [13, 23], [13, 31], [13, 43], [13, 47], [13, 59], [13, 67], [13, 71], [17, 19], [17, 23], [17, 31], [17, 43], [17, 47], [17, 59], [17, 67], [17, 71], [19, 23], [19, 31], [19, 43], [19, 47], [19, 59], [19, 67], [19, 71], [23, 31], [23, 43], [23, 47], [23, 59], [23, 67], [23, 71], [29, 31], [29, 43], [29, 47], [29, 59], [29, 67], [29, 71], [31, 43], [31, 47], [31, 59], [31, 67], [31, 71], [37, 43], [37, 47], [37, 59], [37, 67], [37, 71], [41, 43], [41, 47], [41, 59], [41, 67], [41, 71], [43, 47], [43, 59], [43, 67], [43, 71], [47, 59], [47, 67], [47, 71], [53, 59], [53, 67], [53, 71], [59, 67], [59, 71], [61, 67], [61, 71], [67, 71]}

(2)

BUT CHECKING THESE RESULTS 'MANUALLY' CONFIRMS THE EQUALITY IS INDEED TRUE FOR ALL ODD PRIME PAIRS  p,q.

{seq(F[k][2], k = 1 .. nops(F))}

{3, 7, 11, 19, 23, 31, 43, 47, 59, 67, 71}

(3)

seq(frac(`mod`(F[k][1], F[k][2])+(1/4)*F[k][2]*(F[k][2]-1)), k = 1 .. nops(F))

1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2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, 0, 0, 0, 0

(7)

``


 

Download KRONECKER_delta_RECIPROCITY.mw

Hi, 

 

I'm really not sure what else to say that isnt already obvious from the worksheet i uploaded, it's pretty obvious what i am trying to do i just dont understand what neutral operator even is, and couldn't find anything on the help page i was directed to by the error.

 


 

with(StringTools):

Join([convert(A, 'string'), "=", convert(B, 'string'), "(mod", convert(Set2[1], 'string'), ")"])

"A = B (mod Set2[1] )"

(1)

"convert(&equiv;,'string')"

Error, invalid neutral operator

"convert(&equiv;,'string')"

 

``


 

Download INVALID_NEUTRAL_OPERATOR.mw

ok i think they are called "nested" sequences, i will normally do something like: 

seq(seq(seq(F(i,j,k),i=1..Ri),j=1..Rj),k=1..Rk)

but in this circumstance the number of variables and the ranges for each are specified by the user in combo boxes and text windows etc, so i need to use foldl. The below doesn't work, so i was looking for a hint on what i am doing wrong:

 

 

Thanks in advance

I really need help to understand this i know it is a non associative operation but i just cannot see how no operator is handled in the computation here


 

A := (rand(1 .. 100))():

8

 

8

 

9424

(1)

A := (rand(1 .. 100))():

33

 

33

 

33

(2)

``


 

Download please_HELP.mw

This will be my last question i promise then i will go to bed for a week.

(its what happens when the government decide after 20 years they are going to make it illegal for me taking stimulants therefore must purchase from non pharmacy sources and can barely afford 1 out of every 2 weeks supply, they charge $6 AUD per tablet on the street so, i was prescribed 8 per day, i earn $250 a week, so yes, that is more than all of my money)

Sorry, just want to repeat that as much as possible to embarass my government an infintesimal amount in public forums, never go to australia, my country is a piece of shit and the people here are on the most part uncivilized socially backward morons 

 

 

Edit: Here is a better worksheet for you comrades 
 

restart

X := proc (A, B) options operator, arrow; (`mod`((`mod`(A, n))*(`mod`(B, n)), n))((`mod`(A, n))*(`mod`(B, n))) end proc:

Y := proc (A, B) options operator, arrow; (`mod`((`mod`(A, n))*(`mod`(B, n)), n))*(`mod`(A, n))*(`mod`(B, n)) end proc:

is(X(A, B) <> Y(A, B))

false

(1)

is((`mod`((`mod`(A, n))*(`mod`(B, n)), n))((`mod`(A, n))*(`mod`(B, n))) <> (`mod`((`mod`(A, n))*(`mod`(B, n)), n))*(`mod`(A, n))*(`mod`(B, n)))

false

(2)

A := (rand(1 .. 100))():

is((`mod`((`mod`(A, n))*(`mod`(B, n)), n))((`mod`(A, n))*(`mod`(B, n))) <> (`mod`((`mod`(A, n))*(`mod`(B, n)), n))*(`mod`(A, n))*(`mod`(B, n)))

true

(3)

is(X(A, B) <> Y(A, B))

true

(4)

``


 

Download helpPlz.mw

suppose for example i am working on the function

exp(-I*Pi*(n+2*n*(m-1))/m);

and i wanted to for what ever reason assign a unique symbol to each of the two times the indeterminant 'n' occurs:

exp(-I*Pi*(n[1]+2*n[2]*(m-1))/m)

How could i accomplish this for any function F?

i have tried the method of

map(op, [op(op(exp(-I*Pi*(n+2*n*(m-1))/m)))]);
                [-1, Pi, n, 2 n (m - 1), m, -1]
 

And though i could then use algsubs on the original function for each in the above list, but then ran into problems arising that for any function the number of times i need to map op in iteration is not known, i will actually work this out by the end of the night so i dont know why im bothering asking

 

Edit 2: yep its ok i discovered subsop

First 18 19 20 21 22 23 24 Last Page 20 of 34