Sorry, this content is no longer available

Ask Your Question
0

Problem with simple Pari/GP script in Sage Cell Server

asked 5 years ago

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,"
Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 5 years ago

updated 5 years ago

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).

Preview: (hide)
link

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: 5 years ago

Seen: 223 times

Last updated: Apr 04 '20