Ask Your Question
0

Problem with simple Pari/GP script in Sage Cell Server

asked 2020-04-04 12:56:40 +0100

I am trying to run the following Pari/GP script in Sage Cell Server:

for(x=1, 1000000, for(y=1, 1000000, if(floor((sigma(x)/y)+(sigma(y)/x))==2x-sigma(x),print(x,"   ",y))))

I cannot seem to figure out what is wrong with it.

I confirm that I am choosing the correct option in the drop-down menu (i.e., GP).

I am getting the following error message:

***   expected character: ',' or ')' instead of: ...ma(x)/y)+(sigma(y)/x))==2
  ***   x-sigma(x),print(x,"
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-04-04 12:58:05 +0100

updated 2020-04-04 20:27:51 +0100

slelievre gravatar image

Blimey! I figured it out.

Pari/GP script should have been:

for(x=1, 1000000, for(y=1, 1000000, if(floor((sigma(x)/y)+(sigma(y)/x))==2*x-sigma(x),print(x,"   ",y))))

(the original had 2x instead of 2*x).

edit flag offensive delete link more

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: 2020-04-04 12:56:40 +0100

Seen: 207 times

Last updated: Apr 04 '20