Ask Your Question
1

programming of looping to print selected value of m

asked 2016-10-27 12:10:22 +0200

Sha gravatar image

updated 2016-10-27 16:03:32 +0200

I have the following code for m=1:

Qp=pAdicField(13)
E=EllipticCurve(Qp,[0,0,0,-3267,45630]); E
P=E([-21,324]);P
p=13;p #because I am working 13-adically
R=12104*1*P;R #m=1
S=-2*P;S
Q=R+S;Q
(12 + 8*13 + 5*13^2 + 10*13^3 + 10*13^4 + O(13^5) : 9 + 3*13 + 6*13^2 + 13^3 + 5*13^4 + 2*13^5 + O(13^5) : 1 + O(13^5))

x=Q[0];x
12 + 8*13 + 5*13^2 + 10*13^3 + 10*13^4 + O(13^5)

y=Q[1];y
9 + 3*13 + 6*13^2 + 13^3 + 5*13^4 + O(13^5)
W=(81*x^16 + 40662*x^15 + 14353281*x^14 - 460241028*x^13 - 644722959186*x^12 + 39379675354740*x^11 + 5212980804862026*x^10 - 415546630058854656*x^9 - 8202010485984353739*x^8 + 1396767997483732402758*x^7 - 27550698906220673513787*x^6 - 1044392234943529703379852*x^5 + 60770398462922893831446348*x^4 - 1284453663719469166478575296*x^3 + 14183844641879715988450074288*x^2 - 81800517874945025246941522368*x + 196162341839727571433321441856)- (3240*x^14 + 456840*x^13 + 188268624*x^12 - 45834271200*x^11 - 2435651997264*x^10 + 682353767281968*x^9 - 7053953405575680*x^8 - 2553415737499629216*x^7 + 98906717445152189544*x^6 + 1348117411901578667784*x^5 - 162666175355778441465360*x^4 + 4276857451171442758058304*x^3 - 54456600108308451946891776*x^2 + 350065581968511893813480064*x - 918312303919436410092339456)*y;W
2 + 4*13 + 3*13^2 + 11*13^3 + 11*13^4 + O(13^5)

D=W[0];D
2
T=kronecker(D,p);T
-1

So in this example I reject m=1 because T=-1. So basically I want to do a loop for m=1,2,...,10, and everytime T=-1 I will reject that value of m and only leave set of numbers of m=[2,..10] that gives T=1. I tried doing the coding to work but it keeps giving error regarding the "m" value. I did something like this

Qp=pAdicField(13)
E=EllipticCurve(Qp,[0,0,0,-3267,45630]); E
P=E([-21,324]);P
p=13;p #because I am working 13-adically
R=12104*m*P;R #I use a general m which I will define later that m=1,2,...,10
S=-2*P;S
Q=R+S;Q
x=Q[0];x    
y=Q[1];y
W=(81*x^16 + 40662*x^15 + 14353281*x^14 - 460241028*x^13 - 644722959186*x^12 + 39379675354740*x^11 + 5212980804862026*x^10 - 415546630058854656*x^9 - 8202010485984353739*x^8 + 1396767997483732402758*x^7 - 27550698906220673513787*x^6 - 1044392234943529703379852*x^5 + 60770398462922893831446348*x^4 - 1284453663719469166478575296*x^3 + 14183844641879715988450074288*x^2 - 81800517874945025246941522368*x + 196162341839727571433321441856)- (3240*x^14 + 456840*x^13 + 188268624*x^12 - 45834271200*x^11 - 2435651997264*x^10 + 682353767281968*x^9 - 7053953405575680*x^8 - 2553415737499629216*x^7 + 98906717445152189544*x^6 + 1348117411901578667784*x^5 - 162666175355778441465360*x^4 + 4276857451171442758058304*x^3 - 54456600108308451946891776*x^2 + 350065581968511893813480064*x - 918312303919436410092339456)*y;W

D=W[0];D
T=kronecker(D,p);T

for m in range(10) :
  if T == 1:
     print(m)

Unfortunately, the programming is not working, keeps giving error for m.

By the way, I got the ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-10-27 14:14:36 +0200

castor gravatar image

You may try something like

Qp=pAdicField(13)
E=EllipticCurve(Qp,[0,0,0,-3267,45630])
P=E([-21,324])
p=13 #because I am working 13-adically
for m in [1..10]:
    R=12104*m*P
    S=-2*P
    Q=R+S
    x=Q[0]    
    y=Q[1]
    W=(81*x^16 + 40662*x^15 + 14353281*x^14 - 460241028*x^13 - 644722959186*x^12 + 39379675354740*x^11 + 5212980804862026*x^10 - 415546630058854656*x^9 - 8202010485984353739*x^8 + 1396767997483732402758*x^7 - 27550698906220673513787*x^6 - 1044392234943529703379852*x^5 + 60770398462922893831446348*x^4 - 1284453663719469166478575296*x^3 + 14183844641879715988450074288*x^2 - 81800517874945025246941522368*x + 196162341839727571433321441856)- (3240*x^14 + 456840*x^13 + 188268624*x^12 - 45834271200*x^11 - 2435651997264*x^10 + 682353767281968*x^9 - 7053953405575680*x^8 - 2553415737499629216*x^7 + 98906717445152189544*x^6 + 1348117411901578667784*x^5 - 162666175355778441465360*x^4 + 4276857451171442758058304*x^3 - 54456600108308451946891776*x^2 + 350065581968511893813480064*x - 918312303919436410092339456)*y
    D=W[0]
    T=kronecker(D,p)  
    if T == 1:
        print(m)

but when m=3 you have

W=13^-32 + 12*13^-31 + 5*13^-30 + 4*13^-29 + 10*13^-28 + 13^-27 + 10*13^-26 + 8*13^-25 + 3*13^-24 + 11*13^-23 + 11*13^-22 + 9*13^-21 + 12*13^-20 + 4*13^-19 + 6*13^-18 + 13^-17 + O(13^-16)

and D=W[0] will not be defined. The same happens for m=5 also and for many other values I would guess.

edit flag offensive delete link more

Comments

But why does that happen because if I calculate separately for m=3, I get :

R=12104*3*P = [2 + 11*13 + 11*13^2 + 3*13^3 + 12*13^4 + 10*13^5 + 12*13^6 + O(13^7), 10 + 11*13 + 12*13^3 + 8*13^4 + 5*13^5 + 2*13^6 + O(13^7)]

x=R[1] = 2 + 11*13 + 11*13^2 + 3*13^3 + 12*13^4 + 10*13^5 + 12*13^6 + O(13^7)

y=R[2] = 10 + 11*13 + 12*13^3 + 8*13^4 + 5*13^5 + 2*13^6 + O(13^7)

W = 9 + 4*13 + 10*13^2 + 13^3 + 6*13^5 + 10*13^6 + O(13^7)

and D=W[0] = 9

Sha gravatar imageSha ( 2016-10-27 14:33:01 +0200 )edit
1

Is not x=(121043P-2*P)[0]?

castor gravatar imagecastor ( 2016-10-27 18:53:47 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-10-27 12:10:22 +0200

Seen: 312 times

Last updated: Oct 27 '16